Python Ctypes – loading dll throws OSError: [WinError 193] %1 is not a valid Win32 application

Mentioning [Python.Docs]: ctypes – A foreign function library for Python (although this doesn’t have very much to do with it) just in case. The underlying error is ERROR_BAD_EXE_FORMAT (193, 0xC1). Check it in [MS.Docs]: System Error Codes (0-499). It’s a general Win error (not related to Python). In the current case (related to Python), the … Read more