PoStartNextPowerIrp routine

The PoStartNextPowerIrp routine signals the power manager that the driver is ready to handle the next power IRP. (Windows Server 2003, Windows XP, and Windows 2000 only.)

Syntax


VOID PoStartNextPowerIrp(
  _Inout_  PIRP Irp
);

Parameters

Irp [in, out]

A pointer to an IRP in which the major function code is IRP_MJ_POWER.

Return value

None

Remarks

Starting with Windows Vista, the driver is not required to call PoStartNextPowerIrp and a call to this routine does not perform a power management operation. However, on Windows Server 2003, Windows XP, and Windows 2000, PoStartNextPowerIrp must be called by every driver in a device stack after the driver is finished with the previous power IRP, if any, and is ready to handle the next power IRP. It must be called once by each driver for every IRP_MN_QUERY_POWER or IRP_MN_SET_POWER request.

Although power IRPs are completed only once, typically by the bus driver for a device, each driver in the device stack must call PoStartNextPowerIrp as the IRP travels down or back up the stack. Even if a driver fails the IRP, the driver must nevertheless call PoStartNextPowerIrp to signal the power manager that it is ready to handle another power IRP.

The driver must call PoStartNextPowerIrp while the current IRP stack location points to the current driver. Therefore, this routine must be called before IoCompleteRequest, IoSkipCurrentIrpStackLocation, and PoCallDriver. As a general rule, a driver should call PoStartNextPowerIrp from its IoCompletion routine associated with the IRP or from the callback routine it passed to PoRequestPowerIrp.

Bus drivers must call PoStartNextPowerIrp before completing each IRP.

Requirements

Version

Available starting with Windows 2000.

Header

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

Library

Ntoskrnl.lib

IRQL

<=DISPATCH_LEVEL

See also

IoCompleteRequest
IoSkipCurrentIrpStackLocation
IRP
IRP_MJ_POWER
IRP_MN_QUERY_POWER
IRP_MN_SET_POWER
PoCallDriver
PoRequestPowerIrp

 

 

Send comments about this topic to Microsoft

Afficher:
© 2014 Microsoft