[python-win32] Python, COM, VARIANT, VT_BYREF, Joy!
Vernon Cole
vernondcole at gmail.com
Mon May 24 19:33:50 CEST 2010
If I Recall Correctly, the ActiveXCtrl class in wxPython does not use the
pywin32 tools, but a different package. That, along with no plans to migrate
to Python 3, is why my own work is migrating away from wxPython. Too bad,
too. I rather liked wxPython.
--
Vernon Cole
On Mon, May 24, 2010 at 7:25 AM, Mark Hammond <skippy.hammond at gmail.com>wrote:
> On 22/05/2010 12:15 AM, George Doster wrote:
>
>> Hello All,
>>
>> I'm trying to write a Python program that uses a provided ActiveX
>> component. I have verified the component works ok with Visual Basic.
>>
>> I have used makepy to build the import module for my ActiveX component.
>>
>> I can successfully load the component via the ActiveXCtrl class found in
>> wxPython.
>>
>> My issue is how to call one of the methods of the ActiveX component. The
>> method requires a pointer to a variant.
>>
>> Excerpt from the makepy created module:
>>
>> def OpenUSB(self, lWarning=
>> defaultNamedNotOptArg):
>> return self._oleobj_.InvokeTypes(1, LCID, 1, (3, 0), ((16387,
>> 0),),lWarning)
>>
>> As you can see, the first arg is a VT_BYREF | VT_I4.
>>
>
> You should find that you don't need to supply the argument at all -
> win32com should initialize and provide the param for you and return the
> final result in the return value - assuming the param is an 'out' param.
>
> Cheers,
>
> Mark
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20100524/99f9c1d3/attachment.html>
More information about the python-win32
mailing list