From: Echo on
Hi, Arkady Frenkel,

I tried devcon, but the result is not as I expected.

Remove utility of devcon will uninstall the device, instead of ejecting
device only.
And the source code uses SetupDiCallClassInstaller(DIF_REMOVE,Devs,DevInfo)
to realize this utility, which causes the uninstallation.

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: Echo on
Sorry, I didn't exploer the website thoroughly.
Now I've downloaded the tools and will try it later.

Many Thanks!

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!
> >
> >
From: Gary Chanson on

"Echo" <Echo(a)discussions.microsoft.com> wrote in message
news:142F7F15-F4B1-4ACA-92A7-C8BEEDAF460C(a)microsoft.com...
> Hi, Arkady Frenkel,
>
> I tried devcon, but the result is not as I expected.
>
> Remove utility of devcon will uninstall the device, instead of ejecting
> device only.
> And the source code uses
SetupDiCallClassInstaller(DIF_REMOVE,Devs,DevInfo)
> to realize this utility, which causes the uninstallation.

If you're looking for a program which will force a device to be
unmounted, look for a program called DevEject.

--

- Gary Chanson (Windows SDK MVP)
- Abolish Public Schools




From: Echo on
Many thanks!

That program is what I'm looking for.

Regards,
Echo

"Gary Chanson" wrote:

>
> "Echo" <Echo(a)discussions.microsoft.com> wrote in message
> news:142F7F15-F4B1-4ACA-92A7-C8BEEDAF460C(a)microsoft.com...
> > Hi, Arkady Frenkel,
> >
> > I tried devcon, but the result is not as I expected.
> >
> > Remove utility of devcon will uninstall the device, instead of ejecting
> > device only.
> > And the source code uses
> SetupDiCallClassInstaller(DIF_REMOVE,Devs,DevInfo)
> > to realize this utility, which causes the uninstallation.
>
> If you're looking for a program which will force a device to be
> unmounted, look for a program called DevEject.
>
> --
>
> - Gary Chanson (Windows SDK MVP)
> - Abolish Public Schools
>
>
>
>
>
From: Echo on
Thanks a lot!

I got what I want! And many useful tools!

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!
> >
> >