[python-win32] win32com events using native interfaces

Thomas Heller theller at python.net
Thu Sep 15 21:04:00 CEST 2005


Michael Zuercher <michael at zuerchertech.com> writes:

> I have a COM object that sends events. Rather that have the source 
> interface be 'dispinterface' in the IDL, it is just 'interface'. Is 
> there a way to catch events from this interface using win32com? The IDL 
> for the coclass is below for reference.
>
> [
>    uuid(10020202-EB1C-11CF-AE6E-00AA004A34D5),
>    version(2.0),
>    helpstring("Data Transformation Services Package Object"),
>    helpcontext(0x000002ee)
> ]
> coclass Package2 {
>      interface _Package;
>      [default] interface _Package2;
>      [default, source] interface PackageEvents;
> };

Although it isn't in the recently released 0.1 version, comtypes
supports this.  Also you can receive events from a non-default source
interface.

Thomas



More information about the Python-win32 mailing list