Win32 - InvokeTypes numeric type codes

Mark Hammond mhammond at skippinet.com.au
Tue Feb 22 17:10:20 EST 2000


"Andreas Cardeneo" <Andreas.Cardeneo at mach.uni-karlsruhe.de> wrote in
message news:38B288C6.409432A8 at mach.uni-karlsruhe.de...

> TypeError: object can't be converted to int

This is telling you that one of the params has been declared by the
typelibrary as an integer, but Python can't convert it:

> def AddObservation(self, seriesNumber=defaultNamedNotOptArg,
> Value=defaultNamedNotOptArg, Description=None, originType=None):

Hrrrm - Im not sure there the Nones came from?

> """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)
> -%<-------

The numeric codes are the VT_* and PARAMFLAGS_* constants.  These
constants are available in pythoncom.
3,0 == VT_I4, <no flags>
5,0 == VT_R8, <no flags>
8,48 == BT_BSTR, PARAMFLAG_FHASDEFAULT|PARAMFLAG_FOPT
2,48 == VT_I2, PARAMFLAG_FHASDEFAULT|PARAMFLAG_FOPT

So I can't see why this would need to change - just change those
defaul params and see if it works.

What COM object is this?

Mark.






More information about the Python-list mailing list