I'm running into problems with a proprietary dll, which unfortunetly prevents me from posting the code here. Luckily the problem reduces down to two lines anyway:
import ctypes
windll.LoadLibrary("K:\\Patch\\To\\DLL.dll")
This code works with Python 2.7 but not with Python 3.5. In 3.5 in throws:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "K:\Miniconda\envs\...\lib\ctypes\__init__.py", line 429, in LoadLibrary
return self._dlltype(name)
File "K:\Miniconda\envs\...\lib\ctypes\__init__.py", line 351, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 1114] Eine DLL-Initialisierungsroutine ist fehlgeschlagen
(Sorry about it being in German. Not my decision)
Error in English should be:
OSError: [WinError 1114] A dynamic link library (DLL) initialization routine failed
I've tested my Python 3.5 interpreter with "C:\Windows\System32\aadtb.dll" and it worked so it can load other DLL's.
The DLL I need to load is provided by a third party and closed source. The company we got the DLL from doesn't feel responsible and won't help.
So what my question boils down to: What are the differences between Python 2.7 and Python 3.5?
I know they changed the way errors are reported but I couldn't find anything else.
Edit: The DLL and both python versions use 64bit addressing.