W
W
Weageoo2011-02-24 17:40:50
USB
Weageoo, 2011-02-24 17:40:50

Programmatically Resume a USB Device (Windows OS)

It is known that before pulling out a USB flash drive from the port, you must first safely remove it. This is easy to do, given that the WinAPI provides special. function for this (despite all the nuances, the problem seems to be solved ).

And how can I return the device to the active state without removing it from the USB port ? USB Safely Remove and Zentimo xStorage Manager can do this:

image

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
Oleg Matrozov, 2011-02-24
@Mear

You probably need to dig in the direction of "SetupDiCallClassInstaller" ... here is a code example, though in Delphi:
programmersforum.ru/showpost.php?p=31168&postcount=12
with the functionality you need.

D
Dzuba, 2011-02-24
@Dzuba

I'm sorry, but isn't there another special function nearby for installing the device?
By the way, in the same article there is a link to another one , which describes the trick with error code 21 instead of 47 if the user is an administrator.

K
Kirill Dlussky, 2011-02-27
@Dlussky

USB Safely Remove, when trying to return the device, somehow asked me: they say, am I sure that a wifi module is not plugged into the adjacent port of the same hub? And he promised problems with the network in case of a positive answer. Therefore, I suspect that when the device is returned, the usb controller is juggling, and not the magical return of a separate device.
But of course, these are just my speculations and I don’t understand the problem at a low level, so I recommend contacting the USB SM developers; I think they are Russian and quite adequate.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question