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

Craig H. Anderson craig at coot.net
Thu Oct 14 02:00:15 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? 

Example Visual Basic looks like this: 

Public WithEvents VRServer As IVRNexus  ' COM server's interface class. Not 
creatable by clients.
Private SerStart           As IServerStartup ' Entry into Agent COM server 
to get a pointer to INexus since INexus is not creatable by clients. 

Private Sub VRServer_PDSEvent(ByVal ErrFlag As Boolean, ByVal Command As 
String, ByVal CmdType As String, ByVal data As Variant) 

Private Sub Form_Load()
 On Error GoTo ErrCond
 Set SerStart = New IServerStartup 'Entry point into DLL.
 Set VRServer = SerStart.GetIVRNexus  ' Set MosServer to point to server 
object IMoagent. 



More information about the Python-win32 mailing list