variant com issues/problems in python

Discussion in 'Python' started by Matt Smith, Aug 12, 2003.

  1. Matt Smith

    Matt Smith Guest

    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
    Matt Smith, Aug 12, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Sparrow

    UDF Parameters always Variant - help!!

    John Sparrow, Jul 29, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    448
    John Sparrow
    Jul 29, 2003
  2. The Eternal Squire
    Replies:
    1
    Views:
    567
    Lijun Qin
    Oct 15, 2003
  3. Annie

    Python COM Variant problem

    Annie, Feb 27, 2004, in forum: Python
    Replies:
    3
    Views:
    547
    Roger Upole
    Mar 1, 2004
  4. Ron Rogers Jr.
    Replies:
    2
    Views:
    263
    Ron Rogers Jr.
    Jan 31, 2006
  5. vml
    Replies:
    5
    Views:
    895
Loading...

Share This Page