Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -ru '--exclude=*.txt' hidapi-0.7.99.post12/hidapi/windows/hid.c hidapi-0.7.99.post12-mod/hidapi/windows/hid.c
- --- hidapi-0.7.99.post12/hidapi/windows/hid.c 2015-09-30 01:23:20.000000000 +0200
- +++ hidapi-0.7.99.post12-mod/hidapi/windows/hid.c 2016-01-29 22:37:15.629671300 +0100
- @@ -195,7 +195,7 @@
- #ifndef HIDAPI_USE_DDK
- static int lookup_functions()
- {
- - lib_handle = LoadLibraryA("hid.dll");
- + lib_handle = LoadLibraryExA(".\\hid.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
- if (lib_handle) {
- #define RESOLVE(x) x = (x##_)GetProcAddress(lib_handle, #x); if (!x) return -1;
- RESOLVE(HidD_GetAttributes);
- @@ -222,9 +222,7 @@
- {
- HANDLE handle;
- DWORD desired_access = (enumerate)? 0: (GENERIC_WRITE | GENERIC_READ);
- - DWORD share_mode = (enumerate)?
- - FILE_SHARE_READ|FILE_SHARE_WRITE:
- - FILE_SHARE_READ;
- + DWORD share_mode = FILE_SHARE_READ|FILE_SHARE_WRITE;
- handle = CreateFileA(path,
- desired_access,
- diff -ru '--exclude=*.txt' hidapi-0.7.99.post12/setup.py hidapi-0.7.99.post12-mod/setup.py
- --- hidapi-0.7.99.post12/setup.py 2016-01-19 22:32:54.000000000 +0100
- +++ hidapi-0.7.99.post12-mod/setup.py 2016-01-29 21:55:23.049329900 +0100
- @@ -51,7 +51,7 @@
- )
- ]
- -if sys.platform.startswith('win'):
- +if sys.platform.startswith('win') or sys.platform.startswith('cygwin'):
- modules = [
- Extension('hid',
- sources = ['hid.pyx', 'chid.pxd', hidapi_src('windows')],
Advertisement
Add Comment
Please, Sign In to add comment