Is there a way to save the USB device so that re-enumeration can be prevented after re-loading?

First of all, we work with third-party software that binds to a USB device. When this USB device is disconnected and reconnected, the software cannot communicate with the device , it will stop working until the program is restarted. those. It only detects a USB device at startup.

Windows can see the device, but it goes through the full detection / installation installation procedure each time it reconnects, even if it is reconnected to the same USB port.

The difficulty here is that we cannot modify third-party software to poll the corresponding USB device after disconnecting the device.

Thus, we would like to ask if anyone has any knowledge on how to start writing a C ++ program in order to save the USB state / register, so that Windows does not reinstall the USB port when reconnecting and does not restore the saved state / register. If so, we will appreciate some recommendations in this endeavor. Naturally, we are open to other approaches to solving this problem.

+4
source share
1 answer

You cannot do this at the application level. USB is controlled by drivers. In addition, while the details of USB devices are controlled by specific drivers, the basics (such as listing) are handled by the standard Windows USB driver. This is logical: Windows must first list the device to determine its vendor identifier and product identifier, which then identifies the specific driver to boot.

As for a complete reinstall with each re-entry, this implies a violation by the USB device driver or Windows API driver. My first assumption was that the device does not have a corresponding serial number.

+3
source

All Articles