Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed JNA 5.x and detection HID for Windows (with source code) #62

Open
ivanooi opened this issue Jan 24, 2019 · 2 comments
Open

Fixed JNA 5.x and detection HID for Windows (with source code) #62

ivanooi opened this issue Jan 24, 2019 · 2 comments

Comments

@ivanooi
Copy link

ivanooi commented Jan 24, 2019

Hi, I do not have github setup... but I had made a few changes on it.

I will attach the source code and compiled purejavahidapi.jar file here ...
purejavahidapi.windows.zip

purejavahidapi\windows\SetupApiLibrary.java
purejavahidapi\windows\WinDef.java
purejavahidapi\windows\WindowsBackend.java

SetupApiLibrary.java and WinDef.java
changes :
Pointer.SIZE
to
com.sun.jna.Native.POINTER_SIZE

WindowsBackend.java
changes :
if (drivername != null ) {
to
if ("HIDClass".equals(drivername)) {

purejavahidapi.zip

@nyholku
Copy link
Owner

nyholku commented Jan 25, 2019

Thanks, about the "if (drivername != null ) { toif ("HIDClass".equals(drivername))" , after a quick glans it looks to me that is already in the code. The first one makes sense of course.

@ivanooi
Copy link
Author

ivanooi commented Jan 25, 2019

oopss! my bad, should in this way :

if ("HIDClass".equals(drivername)) {
to
if (drivername != null ) {

:-P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants