One would have thought that you call RegisterDeviceNotification
specifying the GUID you are interested in and OnDeviceChange would be
invoked for those devices only. But it is getting invoked for all
sorts of devices ! How do I tell windows to notify me only for devices
with a particular GUID?
Thanks
Nevil.
// Register to receive notification when a USB device is plugged in.
broadcastInterface.dbcc_size = sizeof(DEV_BROADCAST_DEVICEINTERFACE);
broadcastInterface.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE;
memcpy( &(broadcastInterface.dbcc_classguid),
&(GUID_CLASS_USB_DEVICE),
sizeof(struct _GUID));
m_NotifyDevHandle = RegisterDeviceNotification(m_hWnd,
&broadcastInterface,
DEVICE_NOTIFY_WINDOW_HANDLE);
This will only recevie USB device messages...
--
Mark Cariddi
Consulting Associate
OSR, Open Systems Resources, Inc.
http://www.osr.com/
"nevil" <nev...@gmail.com> wrote in message
news:2b1b9a62.04092...@posting.google.com...