[python-win32] problem with reference parameter to COM function (makepy)

Coleman, Michael MKC at Stowers-Institute.org
Mon Jun 5 21:34:12 CEST 2006


Hi,

I'm trying to use win32com to drive a COM object.  I ran makepy to
create the interface and am (apparently) able to run some of the
object's functions.  I'm having problem, though, with functions that
have reference parameters (e.g., pointer to bool).  

I saw in some documentation (on oreilly.com) that makepy was supposed to
arrange things so that these returned values are returned as a tuple
from the function, but that seems not to have happened in this case.  Is
there something I can do to force this?  Or, am I doing something else
wrong?

Here's the documented signature:

     long	IsError(BOOL FAR* pbIsError);

and here's what makepy generated:

	def IsError(self, pbIsError=defaultNamedNotOptArg):
		"""method IsError"""
		return self._oleobj_.InvokeTypes(7, LCID, 1, (24, 0),
((16387, 0),),pbIsError
			)

(The COM object is some vendor thing--no source code and probably poorly
implemented.)

Any ideas?

Mike


Mike Coleman, Scientific Programmer, +1 816 926 4419
Stowers Institute for Biomedical Research
1000 E. 50th St., Kansas City, MO  64110,  USA


More information about the Python-win32 mailing list