Problems with "Safely Remove Hardware"

From: Alex (alex130671_at_nexgo.de)
Date: 06/25/04


Date: Fri, 25 Jun 2004 15:12:35 +0200

Hello,

I have a USB Mass Storage Device with some additional functionality. To get
the additional
functionality a server process is running and accessing to the USB Mass
Storage Device with
CreateFile(\\\\.\\PhysicalDriveX). I can read and write data to the USB Mass
Storage Device
while the server has opened the device also with CreateFile().
When I plugged out the device directly without using "Safely Remove
Hardware" no dialog
will occur. That is what I want ...
But when I use "Safely Remove Hardware" before I plugged out the USB Mass
Storage Device
and the server process is still running a message "The device "Removable
Device" cannot be
stopped right now. Try stopping the device agian later." is occured. Is
there are a possibility
to stop the device without getting this messages.

One possibilty could be that the server process gets a WM_... messages and
close the
access to \\\\.\\PhysicalDriveX. But which message can do that?
WM_DEVICECHANGE
don't do this.

All hints are welcome.
TIA Alex



Relevant Pages

  • Re: Problems with "Safely Remove Hardware"
    ... Maybe you can define what is "additional functionality" and is it performed ... > I have a USB Mass Storage Device with some additional functionality. ... > functionality a server process is running and accessing to the USB Mass ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Problems with "Safely Remove Hardware"
    ... > I have a USB Mass Storage Device with some additional functionality. ... > functionality a server process is running and accessing to the USB Mass ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Hard Disk vs USB drive
    ... storage device if a USB mass storage device is connected at boot. ... causes the USB drive to be identified as Hard Disk and the internal CF card ... the internal CF card is identified as Hard Disk and when a USB mass ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Maybe OT: This USB device prevents my computer from posting
    ... It's a USB Mass Storage device. ... Do you have any other USB Mass Storage ... What do you have your BIOS set to boot from first? ...
    (comp.os.linux.hardware)