tags:

views:

22

answers:

1

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 for this.

+3  A: 

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.

Hans Passant