DBT_DEVICEQUERYREMOVE mesgs are not automatically broadcast
to all windows. they are only sent to applications that have
registered for DBT_DEVTYP_HANDLE type notifications.
to register for notification of query-removal, etc. events for a
device that you have a handle to, also use RegisterDeviceNotification,
but with a DBT_DEVTYP_HANDLE type NotificationFilter. specify the
handle to the device in the dbch_handle member of the
DEV_BROADCAST_HANDLE structure.
RegisterDeviceNotification:
http://msdn.microsoft.com/library/en-us/devio/base/registerdevicenotification.asp
both device interface and target device change notifications are
sent as WM_DEVICECHANGE mesgs, and both types use some of the
same DBT_* event types, so it is important to know which type
of event you have received.
Processing a Request to Remove a Device:
http://msdn.microsoft.com/library/en-us/devio/base/processing_a_request_to_remove_a_device.asp
hope this helps,
jim.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"SatB" <anon...@discussions.microsoft.com> wrote in message
news:052101c3ce6b$cbd87910$a101...@phx.gbl...