Muokkaa

Jaa


System Power Actions

When the power manager sends an IRP to set or query the system power state, it specifies a system power state along with an additional parameter that gives information about the power state change. This parameter, passed at Irp->Parameters.Power.ShutdownType, is an enumerator of the POWER_ACTION type. The enumerator characterizes the system power state request, as shown in the following table.

POWER_ACTION enumerator System power state requested

PowerActionNone

S0 or no system power IRP active

PowerActionSleep

S1, S2, or S3

PowerActionHibernate

S4

PowerActionShutdown (Microsoft Windows 2000 and later systems only)

S5

PowerActionShutdownReset

S5

PowerActionShutdownOff

S5

When a driver receives a system query or set-power IRP for S5, it can check ShutdownType For more information about the requested shutdown. A driver can use this information to optimize its shutdown sequence when the machine is resetting instead of shutting off power indefinitely. Drivers of most devices retain power when the system resets. However, for certain devices, such as a video streaming device that performs direct memory access (DMA), a driver might choose to power down its device when the system is resetting, thus stopping any ongoing I/O.

When a device power policy owner sends a device power IRP to its device stack in response to a system power IRP, drivers can use the ShutdownType parameter to get information about the current system power IRP. In this case, the value of ShutdownType indicates the currently requested system power state, or it is PowerActionNone if a system request is not outstanding. Drivers should not, however, rely on this information if the device IRP requests state D0.

In Windows 98/Me, this member always contains PowerActionNone when the IRP requests a device power state.