質問

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.

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top