Detectar USB após remover com segurança o USB

4

Atualmente, estou desenvolvendo um aplicativo que

copia todos os arquivos do USB, quando detectados, para o meu disco rígido local

Como mencionei que ainda estou desenvolvendo, eu tenho que plug-in e plug-out meu USB novamente para testar meu código.

Existe uma maneira de detectar o USB novamente após remover hardware com segurança ?

    
por Umair 20.03.2014 / 15:15

1 resposta

2

Resposta do kolypto em ServerFault :

When you "safely remove" a USB HDD - it stops spinning. I believe there's a USB command to turn the device off (sleep mode, actually). So the thing you need is how to turn the device back on.

The application Safelyremove has a command-line tool that is capable of returning the device back: "Returning just stopped device back!".

It is shareware, but it works :)

    
por 20.03.2014 / 15:23

Tags