We are trying to connect to an external piece of hardware using a DLL and faced a problem we were not able to solve so far. Our platform is Windows 7, 64 bit, and we are using Python 2.7, also 64 bit, to write a driver. The DLL we are using is also 64 bit (we double checked that with the PE Deconstructor). We use ctypes to load the DLL, specifically:
import ctypes
ctypes.cdll.LoadLibrary('dllpath')
...
However, we get the error message [Error 193] %1 is not a valid Win32 application
. The same happens if we try to load 32 bit DLLs or use the commands pydll
, oledll
or windll
. Do you have an idea how we could load the DLL or what the solution might be?
We would be very grateful for a helpful answer,
Best, Florian