lbro23 / javahidapi

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

USB Connection/Disconnection event #20

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Am using the C API without the Java code, as i had already written Java API for 
it. But the USB disconnection event is not being triggered properly.

In Windows, for the very first time when the USB is disconnected (for your 
info, have started my Java tool, loaded the hid dll for windows, and while 
loading the dll itself, have registered for the usb event callback.) am not 
able to detect the event. Am using Windows 7 OS. But when the USB is connected 
and disconnected again (for the second time), am getting a successful interrupt 
in my java tool.

In Mac, am not able to create a static library file for its debugging, however, 
while getting the return value for usb event registration in my custom java 
tool, i get a return value of -1, which basically indicates the event 
registration itself is unsuccessful. In Windows, i am able to get 0 for usb 
event registration, which (hopefully) indicates successful registration.

Am using MingW compiler for creation of dll file (Am not using C++ compiler, or 
MS VS for compiling the code).

Am i missing some thing here which would help me in successful detection of the 
event?

Original issue reported on code.google.com by bsrera...@gmail.com on 3 May 2012 at 12:33