What is the best USB library to communicate with USB HID devices on Windows? What is the best USB library to communicate with USB HID devices on Windows? windows windows

What is the best USB library to communicate with USB HID devices on Windows?


Take a look at hidapi: it is C, which answers the C++ bindings question (effectively :)), is cross platform and has a very permissive license.

It doesn't appear to have the callbacks, but...


If libhid works for you, then perhaps the thing to do would be to write an application (which you would GPL), which uses libhid to talk to devices, then provides whatever you need via a TCP connection. Your real application would connect via TCP to do what it needs. This would obviously be a massive performance hit.

This application would effectively be a 'shim' between libhid and your application. In this case, the shim would exist for legal, not technical, reasons.

I'm not saying it's a good idea, just that it's an idea.


Consider rolling your own. You'll have total control over the interface, the level of platform independence, and such. Even though a project is GPL, you can use it as a recipe for your own, and as a testbed to find issues with your own.