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 );