WM_DEVICECHANGE and usb mass storage (OT)

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Though is slightly off topic, my googling has turned up some familiar names
from here. So here goes -- I have a reasonably simple task. I am trying to
monitor a usb memory stick (usb mass storage) for a WM_DEVICECHANGE message
with a DBT_DEVICEQUERYREMOVE event. The problem that I'm having is that when
I do a 'Safely Remove Hardware' icon, I don't see any WM_DEVICECHANGE
messages if there are files open on the stick. All I see is a message
indicating that the device can't be stopped.

If there are no files open, I can see the DTB_DEVICEREMOVECOMPLETE after the
device is ready to remove.

I have tried all sorts of registering for notifications but nothing that
I've done will get me the DBT_DEVICEQUERYREMOVE event. Suggestions
welcomed --

TIA

Mike P


.



Relevant Pages

  • Using the Safely Remove Hardware icon?
    ... I have a few questions about using the 'Safely Remove Hardware' icon ... Safely Remove USB Mass Storage Device - Drive ...
    (microsoft.public.windowsxp.customize)
  • Re: What are all these removable disks in Vista?
    ... there's no card in the slot, it reserves a drive letter. ... If not, then double-click on "Safely Remove Hardware" icon, make sure the box next to "Display Device Components" is checked, and it should tell you what they are. ... There is NO USB Mass Storage Device with 4 devices under it that I can see. ...
    (microsoft.public.windows.vista.general)
  • Hardware recognization
    ... recognize new hardware added. ... Camera conforms to the USB mass storage class ... SanDisk ImageMate SD-MMC - Device Manger list the ...
    (microsoft.public.windowsxp.hardware)
  • Re: TS session minor annoyances...that are making me crazy!
    ... At least I killed the OE icon creation! ... post while I am off on Google looking for the answer. ... I cannot turn off the "Stop USB Mass Storage Device" item in the system ... Gregg Hill (slowly stepping through the lockdown policy still to look for ...
    (microsoft.public.windows.terminal_services)
  • Re: Nokia phone via USB ???
    ... dialling is taken care of trivially with the package wvdial. ... Try googling from wvdial. ... I want to access the USB mass storage ... My Windows using friend does that via USB. ...
    (comp.os.linux.hardware)