// JP opened flex table

Click to See Complete Forum and Search --> : USB Cable Notification..


manishraj
January 6th, 2005, 12:35 AM
Hi all,

I want to write a application which should notify me about the Plugin and unplug of a USB cable in the system and this should also display the VID and PID of that USB device.

How can I do this using Win32 API, plz give me some direction or example code.

Thanks and Regards
Manish Raj

kirants
January 6th, 2005, 08:23 PM
Things to look for:
RegisterDeviceNotification API
WM_DEVICECHANGE
DBT_DEVICEARRIVAL
DEV_BROADCAST_DEVICEINTERFACE and
dbcc_classguid

That probably will have the pid/vid info.

//JP added flex table