Calling PoStartNextPowerIrp from a Filter Driver

Beginning with Windows Vista, calling PoStartNextPowerIrp is not required and call to this routine performs no power management operation. However, in Windows Server 2003, Windows XP, and Windows 2000, a filter driver must call PoStartNextPowerIrp once for every IRP_MN_QUERY_POWER or IRP_MN_SET_POWER request that the driver receives. When the call occurs depends on the type of request and whether the driver will fail or succeed the request, as the following table shows.

Type of request If driver succeeds the request, the call occurs:If driver fails the request, the call occurs:

IRP_MN_QUERY_POWER (device power state)

In an IoCompletion routine, immediately before returning.

In DispatchPower routine, before calling IoCompleteRequest.

IRP_MN_QUERY_POWER (system power state)

In DispatchPower routine, after acquiring remove lock and before setting IRP stack location.

In DispatchPower routine, before calling IoCompleteRequest.

IRP_MN_SET_POWER (device power state)

In an IoCompletion routine, immediately before returning.

Not allowed.

IRP_MN_SET_POWER (system power state)

In DispatchPower routine, after acquiring remove lock and before setting IRP stack location.

Not allowed.

 

 

 

Send comments about this topic to Microsoft

Show: