return pramater in com object function

Discussion in 'Python' started by Gijs Korremans, Jun 2, 2005.

  1. Hi,

    One of the functions in the com object I need to use has a pointer in one of it's functions
    (object.function(string input, struct * output))

    (I've created the struct with win32com.client.Record("structure", object))

    I've tried to use the id() function but then Python gives me a message that it's an int, not a tructure
    and when I just give the object without a pointer, the object is still empty afterwards.

    In the mailinglist archive I saw this message from Mark Hammond:
    "Well, their IDL is at fault, and it clearly should be marked as [in,out]. All we should need to do is to get the makepy generated code for this function, and change the last "type tuple" for this function. It will be a tuple of, eg (pythoncom.VT_OBJECT, pythoncom.PARAMFLAG_FIN). Telling Python it is really _FIN | _FOUT should do the trick"

    So I opened the by genPy generated file and tried to change the last tuple from _ApplyTypes_ but it was already 2 (PARAMFLAG_FOUT):
    return self._ApplyTypes_(1, 1, (24, 0), ((8, 1), (36, 2)), 'SetIDString', None,inID, outID)

    Does anyone know how to solve this?


    Kind regards,


    Gijs


    --
    This message has been scanned for viruses and
    dangerous content by Network Sentry, and is
    believed to be clean.
    http://www.networksentry.co.za
    Gijs Korremans, Jun 2, 2005
    #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. Jon
    Replies:
    5
    Views:
    3,109
    Jon Turner
    Apr 23, 2004
  2. James Vanns
    Replies:
    7
    Views:
    7,002
    Evan Carew
    Jan 21, 2004
  3. Seong-Kook Shin
    Replies:
    1
    Views:
    471
    Richard Bos
    Jun 18, 2004
  4. Greenhorn
    Replies:
    15
    Views:
    780
    Keith Thompson
    Mar 6, 2005
  5. Replies:
    4
    Views:
    520
    James Kanze
    Jul 22, 2008
Loading...

Share This Page