Kelie schrieb:
> Thomas Heller <[EMAIL PROTECTED]> writes:
> 
>> I think Suraj is close.  Can you look up somhow the IDL definition of the 
>> SetXData method, or posth the corresponding line from the generated code?
>> 
> 
> Thank you Thomas. Where can I look up the IDL definition? What does IDL mean?

Sorry for that.  The IDL file is the source file where the COM interface is
defined, it can also be decompiled with the OleObject viewer (a download from
Microsoft if you don't have it) from the type library.  But forget that, the 
generated
code is also sufficient.

> This is from the generated code in comtypes/gen directory:
> 
>     COMMETHOD([dispid(1027), helpstring(u'Sets the extended data (XData)
> associated with an object')], HRESULT, 'SetXData',
>               ( ['in'], VARIANT, 'XDataType' ),
>               ( ['in'], VARIANT, 'XDataValue' )),
> 
>> Does this code work?
>> 
>>   line.SetXData([1001, 1070], ['Test_Application', 600])
>> 
> 
> It doesn't work and gives this error:
> _ctypes.COMError: (-2145320939, None, (u'Invalid argument type in SetXData 
> method',

At least you get a little bit further: The com method is actually called and
the com object complains.  Next you should try this:

>>   line.SetXData(array.array("i", [1001, 1070]), ['Test_Application', 600])

Thomas


-------------------------------------------------------------------------
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