variant com issues/problems in python

M

Matt Smith

Hi, all.

Just a quick question, when setting a COM process to read a value from
a pre-defined register index, I think, I have to change the variable
that the value will be returned to (as I have to do for the same
function in perl), into a VARIANT, However when i run the variant
code....

'serialIndex = win32com.client.pythoncom.VT_VARIANT'

no matter what extension I use (i.e. VT_I4 or VT_BOOL etc etc) it
still returns a type mismatch error. I may be doing something wrong or
getting confused with variant processes in python. I do know the code
I use in perl to do this works but I dont know how to translate this,
fully, into python.

perl code for variant =
Win32::OLE::Variant::Variant(Win32::OLE::Variant::VT_VARIANT|Win32::OLE::VARIANT::VT_BYREF,
0)

Cheers in advance,
Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top