Using PnP Device Interface Change Notification
A driver registers for EventCategoryDeviceInterfaceChange notification so the driver can be notified when device interfaces of a particular class arrive (are enabled) or are removed (disabled) on the machine. For example, a composite battery driver might register for notification of device interfaces of class battery so it can provide information to the operating system about total available battery power.
The following subsections discuss how to register for device interface change notification and how to handle device interface change events in a PnP notification callback routine:
See IoRegisterDeviceInterface and related routines For information about device interfaces.