Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enumerate all HID devices? C#

Tags:

c#

.net

usb

hid

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?

like image 280
Timur Mustafaev Avatar asked Oct 09 '22 08:10

Timur Mustafaev


1 Answers

I found the answer. This link explains how to do this with ManagementObjectSearcher.

Thanks for all who replied!

like image 166
Timur Mustafaev Avatar answered Oct 13 '22 10:10

Timur Mustafaev