Beginning with Windows Vista, calling PoStartNextPowerIrp is not required and a call to this routine performs no power management operation. However, in Windows Server 2003, Windows XP, and Windows 2000, after a driver processes a query-power IRP or a set-power IRP, the driver must call PoStartNextPowerIrp to notify the power manager that it is ready to receive another power IRP. Drivers must call PoStartNextPowerIrp while the IRP stack location points to the current driver and before calling PoCallDriver.
A driver must call this routine once for each IRP_MN_QUERY_POWER or IRP_MN_SET_POWER request that it receives. Drivers do not need to call PoStartNextPowerIrp when handling IRP_MN_WAIT_WAKE or IRP_MN_POWER_SEQUENCE requests.
When a driver calls PoStartNextPowerIrp, the current IRP stack location must point to the current driver. As a general rule, this call is best made from an IoCompletion routine. PoStartNextPowerIrp must be called before IoCompleteRequest, IoSkipCurrentIrpStackLocation, and PoCallDriver. Calling the routines in the other order might cause a system deadlock.
Even if a driver fails the IRP, it must nevertheless call PoStartNextPowerIrp to inform the power manager that it is ready to handle another power IRP.
The following sections clarify when each type of driver should call this routine:
Submit and view feedback for