USB Mass Storage - Safely Remove Icon

Hi,

I’m simulating a USB Mass Storage by handling the SCSI Commands in a virtual driver. I’m using the toaster(enum) application to plug, unplug and eject the simulated device. Everything is fine, except i’m not seeing the “Safely Remove Hardware” icon in the system tray. But when i’m ejecting the device, it is coming and saying “the device can be safely removed”.

I wonder why that icon is not coming. whether i need to handle any User Mode Ioctl or i need to handle any other thing in my virtual driver. Any help is appreciated.

> Hi,

I’m simulating a USB Mass Storage by handling the SCSI Commands in a
virtual
driver. I’m using the toaster(enum) application to plug, unplug and
eject the
simulated device. Everything is fine, except i’m not seeing the
“Safely Remove
Hardware” icon in the system tray. But when i’m ejecting the device,
it is
coming and saying “the device can be safely removed”.

I wonder why that icon is not coming. whether i need to handle any
User Mode
Ioctl or i need to handle any other thing in my virtual driver. Any
help is
appreciated.

What have you told Windows about if your device might be ‘surprise
removed’?

James

In the device PDO’s devicecapabilities structure i set as following.

deviceCapabilities->Removable = TRUE;
deviceCapabilities->SurpriseRemovalOK = TRUE;
deviceCapabilities->EjectSupported = TRUE;

Hi James,

Thanks for the information. I set deviceCapabilities->SurpriseRemovalOK to FALSE. It worked.