Win32-COM pass by ref for long arguments
crankycoder at gmail.com
Fri Sep 24 22:05:55 CEST 2004
I'm trying to use Python to talk to some COM components but I can't
figure out how the pass-by-ref works in PythonWin.
The COM signature I'm trying to call is:
Function OpenTable(ByRef hTableRef As Long, ByVal TableNo As Long) As
I've successfully made calls to other functions in the COM library
from Python - so I'm fairly certain that things _should_ be working.
My call is using an initial value of pythoncom.Empty for hTableRef,
but I'm getting the following stacktrace from within the PythonCOM
File "test.py", line 52, in ?
tableRef = cf.OpenTable(result, 36)
x0x1x0.py", line 315, in OpenTable
return self._oleobj_.InvokeTypes(48, LCID, 1, (11, 0), ((16387,
0), (3, 0)),hTableRef,
pywintypes.com_error: (-2147352571, 'Type mismatch.', None, 1)
Anyone know what's going on here?
More information about the Python-list