Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The POWER_REQUEST_TYPE enumeration indicates the power request type.
Syntax
typedef enum _POWER_REQUEST_TYPE {
PowerRequestDisplayRequired,
PowerRequestSystemRequired,
PowerRequestAwayModeRequired,
PowerRequestExecutionRequired
} POWER_REQUEST_TYPE, *PPOWER_REQUEST_TYPE;
Constants
PowerRequestDisplayRequired Not used by drivers. For more information, see Remarks. |
PowerRequestSystemRequired Prevents the computer from automatically entering sleep mode after a period of user inactivity. |
PowerRequestAwayModeRequired Not used by drivers. For more information, see Remarks. |
PowerRequestExecutionRequired Not used by drivers. For more information, see Remarks. |
Remarks
This enumeration is used by the kernel-mode PoClearPowerRequest and PoSetPowerRequest routines. Drivers that call these routines must specify the PowerRequestSystemRequired enumeration value.
The other three enumeration values—PowerRequestDisplayRequired, PowerRequestAwayModeRequired, and PowerRequestExecutionRequired—are not used by drivers. Applications specify these power request types in calls to the PowerSetRequest and PowerClearRequest functions.
A PowerRequestDisplayRequired power request has the following effects:
- After a period of user inactivity, the session display stays on and will not automatically turn off. If the display is already turned off, the power request turns the display on.
- A screensaver will not automatically start after a period of user inactivity. If a screensaver is already running, the power request stops the screensaver.
- The session will not be automatically locked after a period of user inactivity. If the session is already locked when the driver sends the power request, the session remains locked.
While a PowerRequestExecutionRequired power request is in effect, the calling process continues to run instead of being suspended or terminated by process lifetime management (PLM) mechanisms. When and how long the process is allowed to run depends on the operating system and power policy settings. This type of power request is supported starting with Windows 8.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Supported starting with Windows 7. |
Header | ntpoapi.h (include Wdm.h, Ntddk.h, Ntifs.h, Ntpoapi.h) |