> Suraj Barkale <[EMAIL PROTECTED]> writes:
>> So following should work
>> line.SetXData([1001, 1070], [VARIANT('Test_Application'), VARIANT(600)])
>
> ctypes.ArgumentError: argument 2: <type 'exceptions.TypeError'>: Cannot put
> VARIANT(vt=0x8, u'Test_Application') in VARIANT
>
> Btw, this is from the VBA reference about the SetXData method:
>
> object.SetXData XDataType, XData
>
> XDataType
>
> Variant (array of short); input-only
>
> XData
>
> Array of Variant; input-only
>
OK here is a longer version:

Array_of_2_VAR = comtypes.ARRAY(VARIANT, 2)
XData = Array_of_2_VAR(VARIANT('Test_Application'), VARIANT(600))

I hope this will create a true Array of variants. If this fails; only
Thomas would be able to help you.

Regards,
Suraj

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
comtypes-users mailing list
comtypes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/comtypes-users

Reply via email to