apmorton / pyhidapi

hidapi bindings in ctypes
MIT License
111 stars 42 forks source link

Use c calling convention instead of stdcall for hidapi.dll #12

Closed NZSmartie closed 5 years ago

NZSmartie commented 8 years ago

hidapi.dll (Windows library) does not use the stdcall calling convention. Using ctypes' windll instead of cdll to load the library will later raise exceptions when calling functions.

So, it's safe to move the hidapi.dll library into the library_paths

NZSmartie commented 8 years ago

To add context to the PR. After loading hidapi.dll library in Windows. Python raised an exception ValueError: Procedure probably called with too many arguments (8 bytes in excess)

The top result in Google solved the issue https://stackoverflow.com/questions/5267434/python-ctypes-argument-errors

apmorton commented 5 years ago

See #13