a python shell test:-
*** Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on win32. ***
*** Remote Python engine is active ***
>>> import ctypes as ct
>>> pl1000 = ct.windll.LoadLibrary('pl1000')
>>> _pl1000OpenUnit = pl1000.pl1000OpenUnit
>>> _pl1000OpenUnit.restype = ct.c_short
Traceback (most recent call last):
ValueError: Procedure probably called with not enough arguments (4 bytes missing)
if I set the _pl1000OpenUnit.argtype to ctypes.c_short then it changes the error message to one argument required.
I experimented with everything I can think of for an argument including "None". With VBA I get a handle=16384 so I tried that and 4000 but always an error instead of a return value.
Anyone have a clue as to what I'm doing wrong?