Thanks,
Michael
specify a NotificationFilter type of DBT_DEVTYP_DEVICEINTERFACE
(use a DEV_BROADCAST_DEVICEINTERFACE structure) and specify
GUID_DEVINTERFACE_USB_DEVICE in the dbcc_classguid field
as the device interface class.
(note that the GUID_DEVINTERFACE_USB_DEVICE GUID is also
defined as GUID_CLASS_USB_DEVICE in the windows 2000 DDK).
RegisterDeviceNotification:
http://msdn.microsoft.com/library/en-us/devio/base/registerdevicenotification.asp
Registering for Device Notification:
http://msdn.microsoft.com/library/en-us/devio/base/registering_for_device_notification.asp
Introduction to Device Interfaces:
http://msdn.microsoft.com/library/en-us/install/hh/install/setup-cls_8vs7.asp
when notified of a device interface DBT_DEVICEARRIVAL or
DBT_DEVICEREMOVECOMPLETE removal event (dbch_devicetype
is DBT_DEVTYP_DEVICEINTERFACE), the corresponding
DEV_BROADCAST_DEVICEINTERFACE structure will contain a path
you can use to access the device in the dbcc_name field.
DEV_BROADCAST_DEVICEINTERFACE:
http://msdn.microsoft.com/library/en-us/devio/base/dev_broadcast_deviceinterface_str.asp
if you open a handle to the device, you can register to receive removal-related
events about that specific device (DBT_DEVICEQUERYREMOVE,
DBT_DEVICEQUERYREMOVEFAILED, DBT_DEVICEREMOVEPENDING,
DBT_DEVICEREMOVECOMPLETE) by calling RegisterDeviceNotification with
a DBT_DEVTYP_HANDLE type NotificationFilter (DEV_BROADCAST_HANDLE
structure).
see the toaster "notify" sample in the windows XP DDK for an example of registering
for the various types of device notification events.
hope this helps,
jim.
"Michael Primeaux" <mjpri...@msn.com> wrote in message news:uTfW7bbkCHA.2580@tkmsftngp12...
"Jim Cavalaris [MS]" <jam...@online.microsoft.com> wrote in message
news:OeAq$8alCHA.1928@tkmsftngp07...