[python-win32] Finding the COM server
Tim Roberts
timr at probo.com
Fri Oct 12 23:19:57 CEST 2007
Thomas Heller wrote:
> Tim Roberts schrieb:
>
>> Out-of-process servers call CoRegisterClassObject to register their
>> classes with the COM runtime. That doesn't change the registry. I
>> can't find a COM utility to return the process ID for a given CLSID, and
>> without that, I don't know how you'd find the executable name.
>>
> I think that's not entirely correct. Out-of-process servers call CoRegisterClassObject
> *only* to make the class factory available to the COM runtime. The server is still
> started with CoCreateInstance looking into the registry for finding the executable
> to start.
>
He said the users are starting the server process manually. In that
case, I believe CoCreateInstance will connect to the registered server
without going to the registry. I admit that I have not stepped through
CoCreateInstance to see if this is the case.
If they weren't starting the process manually, then the registry would
be exactly the right answer.
> I event think that at least /some/ out-of-process servers update the registry
> each time they are started. But, a simple experiment should find out if that's
> the case for the OP's app.exe.
>
Yes.
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the python-win32
mailing list