I have a com library that I have a hard time getting to work, some of it
works in win32com, some in comtypes.
Have a question first for comtypes(using python2.4 and svn checkout
3.jan07 of comtypes):
The following code fails at the last step:
self.dl = comtypes.client.GetModule(r"C:\Program Files\Common
Files\Calsep\PvtsDataLayer.dll")
self.fl = comtypes.client.GetModule(r"C:\Program Files\Common
Files\Calsep\PvtsDataModel.dll")
self.datalayer =
comtypes.client.CreateObject(self.dl.FluidDepoWaxDataLayer)
self.fluid = comtypes.client.CreateObject(self.fl.Fluid)
cp=self.datalayer.CheckCompatibility(DatabasePath=r"C:\Program
Files\Calsep\Sample Programs\FlashOSDatabase.fdb")
Errormessage:
File "mtucpvt.py", line 46, in Connect
cp=self.datalayer.CheckCompatibility(DatabasePath=r"C:\Program
Files\Calsep\Sample Programs\FlashOSDatabase.fdb")
ValueError: Procedure probably called with too many arguments (4 bytes
in excess)
The generated inteface code looks like:
_FluidDepoWaxDataLayer._methods_ = [
COMMETHOD([dispid(1745027104), 'propput'], HRESULT, 'UseDatabaseFormat',
( ['in'], PvtsDLUseDatabaseFormat, 'None' )),
COMMETHOD([dispid(1745027104), 'propget'], HRESULT, 'UseDatabaseFormat',
( ['retval', 'out'], POINTER(PvtsDLUseDatabaseFormat),
'None' )),
COMMETHOD([dispid(1610809375)], HRESULT, 'IsConnectedAsReadOnly',
( ['retval', 'out'], POINTER(VARIANT_BOOL), 'None' )),
COMMETHOD([dispid(1610809374)], HRESULT, 'CheckCompatibility',
( ['in'], BSTR, 'DatabasePath' ),
( ['retval', 'out'], POINTER(c_short), 'None' )),
Any ideas on what is wrong here?
Regards
Einar Sørheim
_______________________________________________
Python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32