c# - How do I detect when a device attached to the system is ready for use? -


I'm sorry if this is similar to the previous question but this is something that I have seen I can find out that When my device is connected to the system (via USB) and the message is trapped correctly, but if I plug and plug the device again, by always trying to access the device through the function always The error occurs: ERROR_GEN_FAILURE 31 (0x1F) whose translation - < Strong> The device attached to the system is not working , however, attempts have been made after receiving DBT_DEVICEARRIVAL message, which according to its definition is "strong> a piece of a device or media Has been inserted and is now available ". I believe what is happening here is that despite the device's list being repeated again, the error is not being prepared even when the device is ready, as the device is ready. Has anyone else had to face this problem and got it? Or is there something that I'm missing / looking?

The easiest way to deal with this is through the IMO, WMI.

Look here:

I used WMI in the past to detect the USB drive and this dead is simple and the callback clears things very much


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -