Muokkaa

Jaa


IRP_MJ_POWER

All drivers must be prepared to service IRP_MJ_POWER requests in a DispatchPower routine.

When Sent

The power manager or a driver can send IRP_MJ_POWER requests at any time the operating system is running.

Input Parameters

Depends on the value at MinorFunction in the current I/O stack location of the IRP. Every IRP_MJ_POWER request specifies a minor function code that identifies the requested power action.

Output Parameters

Depends on the value at MinorFunction in the current I/O stack location of the IRP.

Operation

In addition to the usual rules that govern the processing of IRPs, IRP_MJ_POWER IRPs have the following special requirement: A driver that receives a power IRP must not change the major and minor function codes in any I/O stack locations in the IRP that have been set by the power manager or by higher-level drivers. The power manager relies on these function codes remaining unchanged until the IRP is completed. Violations of this rule can cause problems that are difficult to debug. For example, the operating system might stop responding, or "hang."

See Power Management Minor IRPs for detailed information about IRP_MJ_POWER requests.

Requirements

Header

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

See also

DispatchPower