469,890 Members | 1,718 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,890 developers. It's quick & easy.

return pramater in com object function

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 thatit'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 tupleof, 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

Jul 19 '05 #1
0 1069

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.