DeviceMgr::ResetDeviceByClass(GUID_DEVINTERFACE_USB_HOST_CONTROLLER);
I believe that this should stop the redirection, right?
Only libusb can call StopRedirection and release resources related to the redirection.
Moreover, I don't think we call UsbDk_StopRedirect when we uninstall UsbDk,
so the exception being raised is not a concern.
We don't but if there is a race between these 2 flows, what happens? Let's assume the driver verifier is enabled for UsbDk. If some flow cause memory/resource leak in the driver, this will trigger BSOD.
I don't say the change was wrong, just that it was groundless, so it is possible that is was wrong as well as existing code.
Only libusb can call StopRedirection and release resources related to the redirection.
We don't but if there is a race between these 2 flows, what happens? Let's assume the driver verifier is enabled for UsbDk. If some flow cause memory/resource leak in the driver, this will trigger BSOD. I don't say the change was wrong, just that it was groundless, so it is possible that is was wrong as well as existing code.