How to enumerate all HID devices? C#

Timur Mustafaev picture Timur Mustafaev · Dec 2, 2011 · Viewed 9.8k times · Source

I need to enumerate all HID devices connected to my PC. I tried to use this answer, but it enumerates USBHub devices and I can't find there my HID device.

EDIT: I will be glad to know If there any WIN32 API method, to get USB device status (online/offline) using PID and VID?

Answer

Niranjan Singh picture Niranjan Singh · Dec 2, 2011

Microsoft's WDK has documentation for the HID functions and an overview of how to use them. The WDK also includes the header files to use with Visual C++ programs that access HID-class devices (hidsdi.h, hidusage.h, hidpi.h).

Check this link Jan Axelson's Lakeview Research - HID Windows Programming.

Here is an question also available regarding HID devices as you specified in your question: Scanning for a Human Interface Device (HID) using C#