I am trying to use a 3rd party COM application. Several arguments to
the main methods are defined as (24612, 3) in my makepy.py output. I
have seen from previous mailing list discussion in 2007 that this
should mean  I pass an array of  "pythoncom.VT_RECORD |
pythoncom.VT_ARRAY | pythoncom.VT_BYREF".

However when create such an array like so,

state_array = VARIANT(pythoncom.VT_RECORD | pythoncom.VT_ARRAY |
pythoncom.VT_BYREF, [states,])

And pass this to the function it complains:

TypeError: Objects for SAFEARRAYS must be sequences (of sequences), or
a buffer object.

I have looked at the source code, but I do not understand why this
code is incorrect. It seems to be related to a check re the number of
dimensions in the array.

Any advice welcome.

Thanks,
James
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to