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.
I/O Status Block
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).
Sending This IRP
Reserved for system use. Drivers must not send this IRP.