COM/DCOM problem when hosting executable is run as a service

Posted by Mitch on Stack Overflow See other posts from Stack Overflow or by Mitch
Published on 2010-06-03T12:51:43Z Indexed on 2010/06/03 12:54 UTC
Read the original article Hit count: 405

Filed under:
|
|

I am struggling for days now with the following problem:

We have an executable that hosts a COM server, say x.exe. The COM object is instantiated as follows on the calling site:

hRes = CoCreateInstance(CLSID_InterceptX, NULL, CLSCTX_SERVER, IID_IInterceptX, (void**)&pInterceptX);

It all works fine when x runs as an regular application.

We have a tool (I don't know how it works) that encapsulates x.exe so that it runs as a service under Windows (x.exe is a running process). In this case, we never receive a COM call in x.exe (validated by logging). Here is the weird part: From logging the calling site, I can tell that the COM object has been successfully instantiated and also the call to an interface function does not produce an error (SUCEEDED(hres) is true).

Any ideas?

© Stack Overflow or respective owner

Related posts about com

Related posts about windows-services