[python-win32] Re: Desire information about Invoke and InvokeTypes

Roger Upole rwupole at msn.com
Wed Apr 21 11:26:17 EDT 2004


   I ran this in the debugger, and the return value is actually a VT_BOOL (true), which
equates to 1.  Since the return type at the C++ level is different from what the typelib
specifies, I'd guess this is either bad type info in the typelib or a bug in the Excel api itself.

   Oddly enough, it succeeded after I  ran makepy for the excel typelib  However, only
because it wraps the returned bool in the Series generated class.
The returned object is unusable, but at least it doesn't blow up.

   It looks like there's a potential bug in the dynamic dispatch code, though.  InvokeTypes
can return a tuple if there are any out parameters to be returned, but there's a slight 
difference between the way the python code checks for out parameters (in build.py) 
and the way the C++ code determines it (PythonOleArgHelper::ParseTypeInformation).
If the two come up with different interpretations of the number of out params, you could
end up doing a Dispatch of a tuple.
          hth
             Roger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20040421/b3b543da/attachment.html


More information about the Python-win32 mailing list