Redigera

Dela via


IRP_MN_QUERY_STOP_DEVICE

All PnP drivers must handle this IRP.

Value

0x05

Major Code

IRP_MJ_PNP

When Sent

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.

Input Parameters

None

Output Parameters

None

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.

Operation

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, the driver indicates whether it is safe to stop the device for resource rebalancing.

See Plug and Play for the general rules for handling Plug and Play Minor IRPs.

Sending This IRP

Reserved for system use. Drivers must not send this IRP.

Requirements

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

See also

IRP_MN_CANCEL_STOP_DEVICE

IRP_MN_DEVICE_USAGE_NOTIFICATION

IRP_MN_START_DEVICE

IRP_MN_STOP_DEVICE