A: 

You can register to get events like this through the WMI classes. WMI is not simple though but, AFAIK, its the only event driven way to get the info you are after. The only other way is to keep polling to see if things have changed which is, obviously, not a nice wy to do things.

Goz
+1  A: 

SHChangeNotifyRegister in XP, SHChangeNotifyRegisterThread in Vista.

Windows programmer
A: 

The most old way to do this is usage of RegisterDeviceNotification with DEV_BROADCAST_DEVICEINTERFACE initialized like following:

DEV_BROADCAST_DEVICEINTERFACE NotificationFilter; 
ZeroMemory( &NotificationFilter, sizeof(NotificationFilter) );
NotificationFilter.dbcc_size = sizeof(DEV_BROADCAST_DEVICEINTERFACE);
NotificationFilter.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE;
NotificationFilter.dbcc_classguid = GUID_DEVCLASS_FDC; // defined in "devguid.h"

A code example you can find for example here http://www.codeproject.com/KB/system/HwDetect.aspx.

UPDATED: in devguid.h GUID_DEVCLASS_FDC is defined like following:

DEFINE_GUID( GUID_DEVCLASS_FDC, 0x4d36e969L, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
Oleg