DispatchWithEvents when have internal COM interfaces

gloom o_gloom at mail.com
Tue Mar 9 11:54:13 CET 2004


I'm trying to interface NeroSDK COM for burning CDRs.
Everything works fine, but I have problems figuring out how to handle
events which are not in the main COM object.

What I mean is that in the makepy generated source I see:
'class _INeroEvents' which correspond to
DispatchWithEvents("Nero.Nero", MyEventClass)

But I also have
class _INeroDriveEvents
which is part of:
class NeroDrive(CoClassBaseClass): # A CoClass
	# NeroDrive Class
	CLSID = IID('{F3FBC8E7-93A3-11D4-8217-A85459000000}')
	coclass_sources = [
	default_source = _INeroDriveEvents
	coclass_interfaces = [
	default_interface = INeroDrive2

Now, usually I would do something like this:
nero = DispatchWithEvents("Nero.Nero", MyEventClass)
drives = nero.GetDrives(NERO_MEDIA_CD)

But I don't know how to pass an event handle to handle drive events.

This is what I get with GetDrives:
>>> a.GetDrives(constants.NERO_MEDIA_CD)
<win32com.gen_py.Nero 1.1 Type Library.INeroDrives instance at

Further, in VB, the event functions of the drive are named:

while event functions for nero main objects are named:

I would gladly appreciate any suggestions.
Thanks a lot,

More information about the Python-list mailing list