Win32 - InvokeTypes numeric type codes
Andreas Cardeneo
Andreas.Cardeneo at mach.uni-karlsruhe.de
Tue Feb 22 08:01:58 EST 2000
Hi,
trying to use an ActiveX-control with Mark Hammond's Win32 COM
extensions I
experience problems trying to call some methods of the COM-control.
I generated early binding info with MakePy, but this is the traceback I
get:
-%<-------
Traceback (innermost last):
File "E:\temp\fxtest.py", line 4, in ?
fx.AddObservation(0,42)
File "E:\Program
Files\Python\win32com\gen_py\9B90F101-2EB7-11D1-BADB-006097A71E96x0x1x0.py",
line 263, in AddObservation
def AddObservation(self, seriesNumber=defaultNamedNotOptArg,
Value=defaultNamedNotOptArg, Description=None, originType=None):
File "E:\Program
Files\Python\win32com\gen_py\9B90F101-2EB7-11D1-BADB-006097A71E96x0x1x0.py",
line 227, in
_ApplyTypes_pydisp=self._oleobj_.InvokeTypes(dispid, LCID, wFlags,
retType, argTypes, args)
TypeError: object can't be converted to int
-%<-------
The problem might be, that the last two arguments for the
AddObservation-Method are optional but don't have
the default-values set by MakePy (None for both, while the empty string
"" and "1" (one) would be right
according to the typelib.)
I believe that I will have to change the type-code-tuple MakePy
generates here:
-%<-------
def AddObservation(self, seriesNumber=defaultNamedNotOptArg,
Value=defaultNamedNotOptArg, Description=None, originType=None):
"""Adds observations to matrix."""
return self._ApplyTypes_(0x4, 1, (24, 32), ((3, 0), (5, 0), (8, 48), (2,
48)), 'AddObservation', None, seriesNumber, Value, Description,
originType)
-%<-------
But what do I have to enter here? Where can I find the numeric values
and the meaning of those tuples?
Thanks a lot,
Andreas Cardeneo
andreas.cardeneo at mach.uni-karlsruhe.de
More information about the Python-list
mailing list