Reputation: 11
I'm currently working on a python project that uses functions from a DLL in C#. I'm trying to use the ctypes module but I'm getting an error:
OSError: [WinError 193] %1 is not a valid Win32 application
The code that is giving me the problem is this:
DLL = ctypes.CDLL("c:\\Users\\Hunter1300FC\\Desktop\\MyDLL\\WeAreDevs_API-cpp.dll")
I'm using python 3.8.5 64 bit.
Upvotes: 1
Views: 83
Reputation: 51
Your DLL file is likely compiled in 32-bit. Either load a 64-bit DLL or try with 32-bit python. You can easily install 32-bit python with miniconda.
Upvotes: 1