From: Echo on
Removable devices, such as usb devices, flashmedia card, can only be safely
removed by clicking the icon in system tray in WinXP. But how to make it
programmatically?

I tried IOCTL_STORAGE_EJECT_MEDIA, FSCTL_DISMOUNT_VOLUME, but only have
effect in several special cases.

Any advice be appreciated!


From: Arkady Frenkel on
Look at devcon ( enable/disable ) which do it using SetupDi... set of
functions.
You have it in ddk examples or separately on
http://support.microsoft.com/kb/311272

Arkady

"Echo" <Echo(a)discussions.microsoft.com> wrote in message
news:B9E80084-F577-4894-AF03-64CD32494A0D(a)microsoft.com...
> Removable devices, such as usb devices, flashmedia card, can only be
> safely
> removed by clicking the icon in system tray in WinXP. But how to make it
> programmatically?
>
> I tried IOCTL_STORAGE_EJECT_MEDIA, FSCTL_DISMOUNT_VOLUME, but only have
> effect in several special cases.
>
> Any advice be appreciated!
>
>


From: Echo on
Thanks for your reply.

I got the devcon source code and will try this later...

Regards,
Echo

"Arkady Frenkel" wrote:

> Look at devcon ( enable/disable ) which do it using SetupDi... set of
> functions.
> You have it in ddk examples or separately on
> http://support.microsoft.com/kb/311272
>
> Arkady
>
> "Echo" <Echo(a)discussions.microsoft.com> wrote in message
> news:B9E80084-F577-4894-AF03-64CD32494A0D(a)microsoft.com...
> > Removable devices, such as usb devices, flashmedia card, can only be
> > safely
> > removed by clicking the icon in system tray in WinXP. But how to make it
> > programmatically?
> >
> > I tried IOCTL_STORAGE_EJECT_MEDIA, FSCTL_DISMOUNT_VOLUME, but only have
> > effect in several special cases.
> >
> > Any advice be appreciated!
> >
> >
>
>
>
From: Pavel A. on
Look at http://www.uwe-sieber.de/

Regards,
--PA

"Echo" wrote:
> Removable devices, such as usb devices, flashmedia card, can only be safely
> removed by clicking the icon in system tray in WinXP. But how to make it
> programmatically?
>
> I tried IOCTL_STORAGE_EJECT_MEDIA, FSCTL_DISMOUNT_VOLUME, but only have
> effect in several special cases.
>
> Any advice be appreciated!
>
>
From: Echo on
Thanks for reply.

But I didn't find any clue in that website.

Regards,
Echo

"Pavel A." wrote:

> Look at http://www.uwe-sieber.de/
>
> Regards,
> --PA
>
> "Echo" wrote:
> > Removable devices, such as usb devices, flashmedia card, can only be safely
> > removed by clicking the icon in system tray in WinXP. But how to make it
> > programmatically?
> >
> > I tried IOCTL_STORAGE_EJECT_MEDIA, FSCTL_DISMOUNT_VOLUME, but only have
> > effect in several special cases.
> >
> > Any advice be appreciated!
> >
> >