Hi, I have a win32com application that dispatches a COM object, using late or early binding and with events using win32com.client.WithEvents.
The application that is dispatched to sends an event when it is quitting, leaving time for the client to disconnect from the COM server. When this event is received, the del statement is run on both the COM and events object. The problem is that the reference count in Python of these objects, and the GatewayCount and InterfaceCount returned from pythoncom remain above 0. After months of trial and error I sought out a solution leveraging ctypes. This email on the ctypes mailing list looked as if it would be possible to reduce the COM reference count, circumventing the connection between Python reference counts and COM reference counts. http://sourceforge.net/mailarchive/message.php?msg_id=5094807 Since that email the ctypes.com module has been moved to a separate project, titled comtypes. The IUnknown object did not have a from_address attribute in the comtypes module though. Any suggestions or help would be appreciated. Thanks, Dave _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32