[python-win32] Connection point events, not on Dispatch object?

Mark Hammond mhammond at skippinet.com.au
Thu Oct 14 03:36:41 CEST 2004


> I have a vendor com DLL that is used like this:
>
> SerStart = win32com.client.Dispatch('VRNexusS.IServerStartup')
> VrServer = SerStart.GetIVRNexus
>
> How would I attach an event handler to the VrServer object?

Something like:

SerStart = win32com.client.Dispatch('VRNexusS.IServerStartup')
VrServer = SerStart.GetIVRNexus
VrServer = win32com.client.DispatchWithEvents(VrServer, YourEventClass)

See the docstring for DispatchWithEvents, noting that although the first
param is named 'clsid', you can still pass an existing Dispatch object.

Mark



More information about the Python-win32 mailing list