How to list all HID devices? WITH#

I need to list all the HID devices connected to my computer. I tried using this answer , but it lists the USBHub devices, and I cannot find my HID device there.

EDIT : I will be glad to know if there is any WIN32 API method to get the status of a USB device (online / offline) using PID and VID?

+4
source share
2 answers

The Microsoft WDK contains documentation for HID features and an overview of how to use them. The WDK also includes header files for use with Visual C ++ programs that access HID devices (hidsdi.h, hidusage.h, hidpi.h).

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

The question about HID devices is also available here, as you indicated in your question: Scanning for the user interface (HID) using C #

+2
source

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

Thanks to all who responded!

+2
source

Source: https://habr.com/ru/post/1384295/


All Articles