Thanks Anatoliy.
Al Doman pointed me to Microsofts 'Devcon' utility that is perfect for my situation.
It can be reached in
http://support.microsoft.com/kb/311272I think with 'Devcon' and 'ShellExecute' I can achieve what I need.
I'll give a reading in your directions, too.
Thanks for your attention.
>The PNP Manager API functions can be used for enumerating devices on local machine. After enumeration, the CM_Request_Device_Eject function can be called with the handle of a device to safely remove (or eject) it, if it is removable. It does remove USB drives, but I cannot test it with other types of devices. Chances are that it may not. Besides I'm not aware of a function that can reconnect devices.
>
>
Enumerating devices installed on the local machine>
http://www.news2news.com/vfp/?example=545>
>
Disconnecting USB Mass Storage Device programmatically>
http://www.news2news.com/vfp/?example=553>
>Logically thinking, there should be some functionality within the PNP Manager allowing to disable and enable devices. Need to do some homework.
>
>* * *
>Another option is the Setup API, functions DiUninstallDevice and DiInstallDevice sound promising. Calling them can be a challenge though.
***
TONY Nascimento
*****************
"Your mind is like a parachute. It only works if it is open" - Anthony J. D'Angelo
"The desire to know is natural to good men" - Leonardo da Vinci