Handling Stop IRPs (Windows 2000 and Later)
Drivers that run only on Windows 2000 and later versions of Windows (WDM versions 0x10 and greater) receive stop IRPs only when the PnP manager rebalances resources. The following sections describe techniques such drivers should use in handling stop IRPs:
Handling an IRP_MN_QUERY_STOP_DEVICE Request (Windows 2000 and later)
Handling an IRP_MN_STOP_DEVICE Request (Windows 2000 and later)
Handling an IRP_MN_CANCEL_STOP_DEVICE Request (Windows 2000 and later)