[python-win32] Max parameters in method of IConnectionPoint interface?

Brad Johnson Brad.Johnson at ballardtech.com
Thu Mar 27 22:00:48 CET 2008


Mark Hammond <mhammond <at> skippinet.com.au> writes:

> There is no arbitrary limit that I recall.  Can you show us a snippet of
> failing code and the traceback?
> 
> Thanks,
> 
> Mark
> 

Hi Mark,

I've gotten right down to the problem. Has nothing to do with the number of
parameters. One of the parameters is of type VT_VARIANT (0x000c). That variant
type is not supported by the function PyCom_PyObjectFromVariant, which gets
called along the chain of getting the values down to Python. The default case
statement returns E_OUTOFMEMORY if the type can't be converted to a BSTR.

So, obviously PyCom doesn't like a variant of type VT_VARIANT. The object
actually held inside the variant is a SAFEARRAY of 32 elements. Passing it in as
type VT_VARIANT made my C++ clients happy.

So I guess my question becomes how can I change the parameter type so everyone
is happy?





More information about the python-win32 mailing list