Frage

I need to get a vendor id and device id from a known device path (like "D:\").
I need to do it in java but I could do it in c native code and call the function in java.
I've tried some java libraries such as javax.usb however I can't associate a device with it's path. Now I have finished all my ideas. Can someone help me or give me a way to do it? I need it for windows/macOS.

War es hilfreich?

Lösung

Have a look at this post. You'll probably need to use JNA or JNI to interface with the native Windows SetupDi functions to parse through and find device paths that you care about.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top