return pramater in com object function

G

Gijs Korremans

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
 

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,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top