Win32 COM: Passing NULL as a value

William Wicker william_wicker at spectratechnologies.com
Fri Feb 16 13:35:12 EST 2001


I am trying to work via the COM interface to an object that exposes a 
method something like this:

AnObject.DoSomething(doWhat, toWho)

where toWho is either a dispatch pointer, or NULL, if toWho is not 
significant.

When I try to do this with

obj = win32com.client.Dispatch("AnObject")
obj.DoSomething("kick", None)

or

obj.DoSomething("kick", 0)

I get type mismatch errors back from the COM object.

Is there a way to pass a NULL pointer via win32 COM?

P.S.

I'm trying this with the ActiveState Python 2.0 distribution (python win 
build 202)

Thanks!

    	William.



More information about the Python-list mailing list