Tech Support > Microsoft Windows > Drivers > RegisterDeviceNotification and safe hardware removal
RegisterDeviceNotification and safe hardware removal
Posted by sienaman on December 17th, 2005


I trying to detect when the user wants to use the "Safe Remove Hardware"
dialog on a USB flash device. I monitoring a directory on the flash device
and until the directory monitor is closed, Safe Remove Hardware requests
will fail. I thought that RegisterDeviceNotification using the device's class
GUID would do the trick but I have yet to see any device change notifications
when trying to do a safe removal.

Anybody know if this approach is correct?

Thanks

Posted by Doron Holan [MS] on December 17th, 2005


register for notifications on the file handle that you open. you will then
be notified of queries to safely remove the hardware.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"sienaman" <sienaman@discussions.microsoft.com> wrote in message
news:45B62B19-190D-4436-8058-CA33095FDD4A@microsoft.com...



Similar Posts