How can we check existence of a USB device

Started by Gujarish, July 05, 2019, 04:44:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Gujarish

Hello everyone,,,
My PC has a USB port connecting to an HID machine. After restarting several times, the HID will disappear and can't be shown in Device Manager. What I want to do is to write a program to restart the PC, check existence of that HID and show the restarting count in case of HID disappearing.
My question is how I can check existence of an HID in Visual C++....

Salmon Trout


patio

Human Interface Device...thank Bill Gates for the terminology...
" Anyone who goes to a psychiatrist should have his head examined. "

Salmon Trout

What, keyboard, mouse, trackball, touchpad, etc?

patio

They all qualify...thats why inventing that term is dumber than a sack of hammers...
" Anyone who goes to a psychiatrist should have his head examined. "

Lisa_maree

Microsoft supplies a program called USBview to diagnose this type of problem might be worth a look.

https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/usbview

Or another option is https://www.nirsoft.net/utils/usb_devices_view.html

Both programs will give information of what is causing the device not to load.
You have not lived today until you have done something for someone who can never repay you."
― John Bunyan