Passing interface to out-of-proc local COM server

I’m sorry for large OOT question, but I know that there are a couple of COM
experts in this list.
I need to develop an out-of-proc local COM server S (an EXE) that serves as
a connection point between two other components that can be created by
third-party developers. One of those components is an in-proc COM server (B)
that is loaded in the context of my COM server and uses some of its generic
interfaces. The second one is a COM client (C) that demands my server to
load B and initialize it with some parameters. Structure of the parameters
is completely unknown to S (but is known to B and C) so I need a generic way
to pass those parameters from C to S and then from S to B. The only
COM-copliant way I can think of is to have a method in my S interface
declared something like
LoadB( [in] REFIID CLSID_of_B, [in] REFIID paramIID, [in, iid_is(paramIID)]
IUnknown* pParamInterface)
so S can CoCreateInstance(CLSID_of_B) and call pB -> Init(pParamInterface),
and then B can call pParamInterface -> QueryInterface() with interface ID
known to B and C
When I tried to implement this whenever I call LoadB I get an error
0x80040155L (Interface not registered) although I can see my param’s
interface in OLE viewer.
Can anybody tell me what am I doing wrong? And also can anybody siggest me
the best way to implement that type of interconnection between those three