Export (0) Print
Expand All

Removing a Device

The PnP manager directs drivers to remove their device objects for a device when the device has been, or is being, physically removed from the machine. The PnP manager also sends a remove IRP when a user requests to update the drivers for a device and, on Windows 2000 and later, when the device is disabled or fails to start.

The following sections describe when the PnP manager issues remove IRPs and what drivers must do to respond to those IRPs. This section covers the following topics:

Understanding When Remove IRPs Are Issued

Handling an IRP_MN_QUERY_REMOVE_DEVICE Request

Handling an IRP_MN_REMOVE_DEVICE Request

Handling an IRP_MN_CANCEL_REMOVE_DEVICE Request

Handling an IRP_MN_SURPRISE_REMOVAL Request

Using Remove Locks

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft