Answer the question
In order to leave comments, you need to log in
Error when working with dll (NameError: name 'WinDLL' is not defined) how to overcome this?
Good day. There is a dll library and a wrapper for it written in python. The bottom line is that when running scripts using this wrapper, an error appears. The scripts run on a machine with ElementaryOS Luna, Python 3.5.0.
/home/user/Envs/test/bin/python3.5 /home/user/PycharmProjects/StealthScripts/py_stealth.py
Traceback (most recent call last):
File "/home/user/PycharmProjects/StealthScripts/py_stealth.py", line 35, in <module>
stealth_dll = WinDLL('/home/user/Stealth/Script.dll')
NameError: name 'WinDLL' is not defined
Process finished with exit code 1
/home/user/.wine/drive_c/Python34/python.exe /home/user/PycharmProjects/StealthScripts/py_stealth.py
fixme:heap:HeapSetInformation (nil) 1 (nil) 0
fixme:msvcrt:__clean_type_info_names_internal (0x1d1b51cc) stub
fixme:msvcrt:__clean_type_info_names_internal (0x1e290f6c) stub
Process finished with exit code 0
Answer the question
In order to leave comments, you need to log in
The fact is that ctypes, which deals with loading dynamic libraries, is not completely cross-platform. As the documentation says , the WinDLL function only exists in ctypes under Windows. From Python on Linux, you will not be able to load a dynamic library compiled on Windows.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question