COM server error

Gordon McMillan gmcm at hypernet.com
Thu Jun 3 23:43:30 CEST 1999


COM wizards:

 I have a Python class acting as a COM server. It uses CLSCTX_SERVER 
and uses the following code in __init__ to become a "singleton":

self.handle = pythoncom.RegisterActiveObject(
   win32com.server.util.wrap(self), self._reg_clsid_, 1)	

Things work wonderfully. For a while. Then my machine (NT 4 SP4) 
starts acting like a W9x box: the python process that has the COM 
server open won't respond and can't be killed. No sign in Task Mgr of 
the pythonw process running the COM server. Machine won't reboot. Has 
to be powered off (just like an HPUX box with a bad NFS config 
-hee hee!). The event log has the following message:

    The server {7C43A261-ABB7-11D2-93E1-00609736B700} did not 
    register with DCOM within the required timeout. 

I'm afraid I'm still on 1.52b2 and build 123. If you say this is 
fixed in build 124, I'll provisionally believe you <wink>.

The code is complex, but since I started from one of Andy's samples, 
I would imagine I could recreate the problem in something much 
smaller, if needed. (I also searched thru a long thread about 
creating COM singletons but couldn't find a resolution - I chose this 
method based on my understanding of Don Box's comments.)

- Gordon




More information about the Python-list mailing list