2
votes

I have a com server running as an .exe . This COM server has two COM implementation. COM1 has inteface in it say "interface1" and COM2 has "interface2". In one of the methods of "interface1" say XYZ(IDispatch **pIDispatch), I instantiated the COM2 using "CoGetClassObject()" with "CLSCTX_LOCAL_SERVER" and created "interface2" and pass its "IDispatch" pointer through that method.

The client on the same machine uses COM Proxy DLL to communicate with COM Server. Client calls "interface1" method XYZ(), the function is executed successfully but the IDispatch returned is NULL to the client.

The machine is 32 bit.

Can someone tell why it is so, or what i am trying to get is not possible.

1
Presumably you are using out-of-proc to bridge the 32/64 bit divide? - David Heffernan
Yes 32 bit client is using Proxy DLLs to communicate with 64 bit COM Server - decisive
Looks like you are ignoring the HRESULT return value of the call. Don't, you won't know why it failed. - Hans Passant
Thanks for pointing about the HRESULT return value. HRESULT returns S_OK so from HRESULT we don't get any information about failure. - decisive

1 Answers

0
votes

The isssue has been resolved i was not using the keyword [out, retval] in the idl file for the argument IDispatch. After putting this in the interface metthod . The IDispatch value was retunred successfully to the client by the COM server.