win32com and outgoing dispatch interfaces (events)

Syver Enstad syver.enstad at sensewave.com
Mon Sep 4 17:58:12 EDT 2000


Hi!

I am looking at automating the Visual C++ using Python, and am currently in
the process of hooking into the application object to receive its events.
Since I can't use the win32com.client.DispatchWithEvents because the
IApplication object already exists, I use the tecnique of inheriting my
event receiving class from win32com.client.getevents("MSDEV.Application").
I then make an object of this class passing the IApplication object to its
constructor.

If anyone read my previous post on receiving events from IE, I am having the
same problems here as I had then. Most of the events come through just fine.
But some of then just won't be called.

I have considered this a little and I think I can see a pattern that
identifies the events that will be called and the ones that won't.
After looking at the IApplicationEvents interface in oleview.exe (OLE/COM
Object Viewer) I see that all the events that won't get called pass an
IDispatch pointer in the parameter list, whereas the events that gets called
have no params or only integral types in the parameter list. As far as I
remember this was the case with the IE events too. Where a method like
DocumentComplete won't get called and it passes an IDispatch pointer whereas
DownLoadComplete will get called and it doesn't pass any parameters at all.

Does anyone know of any place in the win32com code I can look where I might
see why this happens? Any pointers much appreciated.







More information about the Python-list mailing list