All PnP drivers must handle this IRP.
The PnP Manager sends this IRP to query whether a device can be stopped to rebalance resources.
On Windows 98/Me, the PnP Manager also sends this IRP when a device is being disabled.
The PnP Manager sends this IRP at IRQL PASSIVE_LEVEL in the context of a system thread.
None
None
A driver sets Irp->IoStatus.Status to STATUS_SUCCESS or to an appropriate error status. If a driver cannot stop the device, the driver sets Irp->IoStatus.Status to STATUS_UNSUCCESSFUL.
A bus driver can set Irp->IoStatus.Status to STATUS_RESOURCE_REQUIREMENTS_CHANGED to indicate success for the IRP but also to request that the PnP Manager requery the resource requirements for the device before sending the stop IRP.
This IRP is handled first by the driver at the top of the device stack and then passed down to each lower driver in the stack.
In response to this IRP, Windows 2000 and later drivers indicate whether it is safe to stop the device for resource rebalancing.
On Windows 98/Me, this IRP is sent not only during resource rebalancing, but also when a device is being disabled. Because a driver cannot distinguish these two situations, it should proceed as if the device were being disabled. If there are any open handles to the device, the driver should fail this IRP. If no handles are open, the driver should proceed as described in Handling an IRP_MN_QUERY_STOP_DEVICE Request (Windows 98/Me).
See Plug and Play for detailed information on handling stop IRPs and for general rules for handling all Plug and Play Minor IRPs.
Reserved for system use. Drivers must not send this IRP.
IRP_MN_CANCEL_STOP_DEVICE, IRP_MN_DEVICE_USAGE_NOTIFICATION, IRP_MN_START_DEVICE, IRP_MN_STOP_DEVICE