Re: Unsafe USB Memory stick removal



I don't think I was being clear with the original question. So here is a
second try at asking the question.

What I am looking for is a method to provide the same capability as the Tool
Tray app that provides the safe method of "Eject or unplug hardware". In
our application we want to be able to cleanly handle USB device removal such
that the user does not need to use the provided Tool Tray application. I
have read through several MSDN pages that discuss the pnp Manager and its
ability to performs these operations on devices, however most of the
discussion is based on the kernal side of writing device drivers. We are
not trying to write a custom device driver merely trying to use the services
that exist within Windows.

Thanks.

""Martin Borve [MSFT]"" <martinbo@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:MIu%23de3pFHA.472@xxxxxxxxxxxxxxxxxxxxxxxx
> The "Unsafe Removal of Device" was removed from Windows XP entirely. You
> will not see this dialog for surprise removal of any device.
>
> There is no API to enable or disable this behavior in Win2K. The only
> thing that determines if this dialog appears is whether or not the device
> indicated that it supports surprise removal. This is done by setting the
> DEVICE_CAPABILITIES SurpriseRemovalOK field to TRUE when handling
> IRP_MN_QUERY_CAPABILITIES.
>
> To change this behavior you would need to write a filter driver that
> installs on top of the device you are interested in, and then modifies the
> SurpriseRemovalOK field when IRP_MN_QUERY_CAPABILITIES is being completed.
>
> Martin Borve
> Windows DDK Support
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
>
>


.



Relevant Pages

  • Re: Unsafe USB Memory stick removal
    ... Maxim Shatskih, Windows DDK MVP ... > I don't think I was being clear with the original question. ... > Tray app that provides the safe method of "Eject or unplug hardware". ... > discussion is based on the kernal side of writing device drivers. ...
    (microsoft.public.development.device.drivers)
  • Re: The performance of Editplus is much better than notepad,Why?
    ... Linux is one of the finest operating systems to have ever been created in the 1960s. ... windows desktop app developing is .Net,OS is becoming weaker as VM ... If you need to write device drivers, I think that C/C++ is the way to ... If Microsoft "closes" the Win32 APIs for next versions of Windows, ...
    (microsoft.public.vc.mfc)
  • Windows CE Software Engineer Opportunity in Columbia, MD
    ... Title: Windows CE Software Engineer ... Write device drivers and integrate Windows CE to company's embedded single ... board computers. ... Inc. (ADS) is a leading developer of RISC-based ...
    (microsoft.public.windowsce.embedded.vc)
  • Summary: C programming language / query for hardware attributes q uestion.
    ... Below is the original question and following ... Thanks to Doctor Thomas Blinn, Thomas Cunningham, Tom Linden, ... and Bluejay Adametz for their contributions to my question. ... Writing Device Drivers for the SCSI/CAM Architecture Interfaces with a Part ...
    (Tru64-UNIX-Managers)
  • Windows CE Software Engineer Opportunity in Columbia, MD
    ... Title: Windows CE Software Engineer ... Write device drivers and integrate Windows CE to company's embedded single ... board computers. ... Inc. (ADS) is a leading developer of RISC-based ...
    (microsoft.public.pocketpc.developer.networking)