Re: Safely removing hardware
- From: Uwe Sieber <mail@xxxxxxxxxxxxx>
- Date: Sun, 28 Jan 2007 20:15:59 +0100
Uwe Sieber wrote:
cartoper@xxxxxxxxx wrote:I am working on a program that reads data from a removable device (USB Stick) that the user will insert into the computer and then when the data is removed, will need to remove the media. In the system tray, there is the icon/tool to "Safely Remove Hardware". How do I do that programmatically? I am working in C#, so if I can avoid dropping to the API level, that would be great, but with 10+ years of C/C++ experence, WinAPI level examples work, too!
Today I've seen that Vista
redetected an USB hard disk immediately after using
CM_Query_And_Remove_SubTree successfully.
With the flag CM_REMOVE_NO_RESTART the redetection does not happen.
Uwe
.
- References:
- Safely removing hardware
- From: cartoper
- Re: Safely removing hardware
- From: Uwe Sieber
- Safely removing hardware
- Prev by Date: Re: Safely removing hardware
- Next by Date: Re: Generate NT Events
- Previous by thread: Re: Safely removing hardware
- Next by thread: RE: Overlapped IO with error 0x800705AD
- Index(es):