开发者

How to get process handle of a local COM server?

I have an IUnknown pointer to a COM local (out of process) server in my Windows client application. Would like to get a handle to the window process that is running the local COM server.

Any way to do this via COM without adding a new interface to the server to request the process handle? (I can't easily change the server).

Why do I want to do this? Because I am trying to make sure the out-of-proc COM server gets shutdown IF my application crashes. I wanted to use windows job objects开发者_JS百科 for this.


I assume you mean an out-of-process server. No, COM is heavily invested in preventing you from retrieving this information. Important so it can host the COM object as it sees fit. Which enables things like surrogates, DCOM and the COM+ stuff.

You'll need the interface method.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜