RE: Unsafe USB Memory stick removal



{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\f0\fs20 The "Unsafe Removal of Device" was removed from Windows XP entirely. You will not see this dialog for surprise removal of any device.
\par
\par 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.
\par
\par 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.
\par
\par Martin Borve
\par Windows DDK Support
\par This posting is provided "AS IS" with no warranties, and confers no rights.
\par
\par
\par
\par
\par }