hidapi/windows
Alan Ott c7f35c3a46 Try opening with sharing mode enabled on Windows if normal open fails.
Multiple users have reported the need to pass
SHARE_MODE_READ|SHARE_MODE_WRITE to CreateFileA(). It seems that some
devices will not open at all if sharing is not requested. This commit
makes it so that CreateFileA() will be tried twice, the first time with
sharing mode OFF (passing 0x0 to the ShareMode parameter of CreateFileA()),
and if that fails, it will try to open the device with share mode ON
(passing the above SHARE_MODE_ flags to the ShareMode parameter of
CreateFileA()). This will have the following effects:

For normal devices:
   Devices will open as normal. Only one instance can be opened at a time.
For devices which require share mode to be on:
   Devices will now open (they would not open at all before). Multiple
   instances can be opened. This is less than desirable, but the
   alternative is that these devices don't open at all.
2011-08-31 12:39:02 -04:00
..
ddk_build Fixed the Windows build files to have the proper paths. 2010-07-28 20:23:14 -04:00
.gitignore .gitignore to ignore generated files 2010-07-27 22:57:10 -04:00
hid.cpp Try opening with sharing mode enabled on Windows if normal open fails. 2011-08-31 12:39:02 -04:00
hidapi.sln Fixed the Windows build files to have the proper paths. 2010-07-28 20:23:14 -04:00
hidapi.vcproj Fixed path for hidapi.h 2010-08-10 14:14:22 -04:00
hidtest.vcproj Fixed the Windows build files to have the proper paths. 2010-07-28 20:23:14 -04:00
Makefile Makefiles for MinGW 2011-04-08 18:48:12 -04:00
Makefile.mingw Makefiles for MinGW 2011-04-08 18:48:12 -04:00