ctypes: Problems using Windows-DLL from VB example code

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


Noralf Trønnes schrieb:
> Hi
> 
> I'm trying to use a DLL from Python using ctypes.
> The call to dso_lib.capture_hold_chk() does return 232. So it seem to work.
> The call to dso_lib.port_init(init_data) gives:
> WindowsError: exception: access violation reading 0x00000006
> 
> Any suggestions?
> 

Have you tried to pass the structure by reference?

dso_lib.port_init(byref(init_data))

Thomas




More information about the Python-list mailing list