joecarr / javahidapi

Automatically exported from code.google.com/p/javahidapi
Other
0 stars 0 forks source link

Two identical devices, enumeration can fail (listDevices) #29

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Call listDevices()
2. See that no devices or only some of the HID devices are listed. Some or all 
devices are missing occasionally.

What is the expected output? What do you see instead?
1. All available devices should be listed.

What version of the product are you using? On what operating system?
December 2011 edition on Windows 7 Professional 32 bit.

Please provide any additional information below.

It is in the open call in hid.c it fails. In the open call you first try to 
open usb by path without sharing, and if it fails, you try to open with sharing 
(FILE_SHARE_READ | FILE_SHARE_WRITE). The first open call should be removed and 
the second inserted as the only one. That fixes the problem, and all devices 
are listed correct. 

Original issue reported on code.google.com by i...@stokerkontrol.dk on 6 Aug 2012 at 6:30