Guest User

Untitled

a guest
Jul 17th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. __declspec(dllexport) int sum(int a, int b) {
  2. return a + b;
  3. }
  4.  
  5. from ctypes import cdll
  6.  
  7. mydll = cdll.LoadLibrary('libTest.dll')
  8.  
  9.  
  10. if __name__ == '__main__':
  11. pass
  12.  
  13. Traceback (most recent call last):
  14. File "C:Usersrobertodg.p2poolpluginsorg.python.pydev.core_6.4.3.201807050139pysrc_pydev_runfilespydev_runfiles.py", line 468, in __get_module_from_str
  15. mod = __import__(modname)
  16. File "C:Usersrobertodgeclipse-workspaceLetsHopeHope.py", line 8, in <module>
  17. mydll = cdll.LoadLibrary('libTest.dll')
  18. File "C:UsersrobertodgAppDataLocalProgramsPythonPython37-32libctypes__init__.py", line 434, in LoadLibrary
  19. return self._dlltype(name)
  20. File "C:UsersrobertodgAppDataLocalProgramsPythonPython37-32libctypes__init__.py", line 356, in __init__
  21. self._handle = _dlopen(self._name, mode)
  22. OSError: [WinError 193] %1 is not a valid win32 application
Add Comment
Please, Sign In to add comment