ctypes: Problems using Windows-DLL from VB example code

Thomas Heller theller at ctypes.org
Wed May 9 14:13:08 EDT 2007


>> Have you tried to pass the structure by reference?
>>
>> dso_lib.port_init(byref(init_data))
> 
> That gives me another exeption:
> 
>     print dso_lib.port_init(byref(init_data))
> ValueError: Procedure called with not enough arguments (4 bytes missing) or 
> wrong calling convention

Please try using 'windll' instead of 'cdll' to load the library; then call 'dso_lib.port_init(byref(init_data))'.

Thomas




More information about the Python-list mailing list