ExecutionState Enumeration

Enables an application to inform the system that it is in use, thereby preventing the system from entering sleep or turning off the display while the application is running.

Definition

Namespace: DevCase.Win32.Enums
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[FlagsAttribute]
public enum ExecutionState

Remarks

Members

None 0 Any state.

Don't use this value. This value is used to detect a ExecutionState function fail.

SystemRequired 1 Forces the system to be in the working state by resetting the system idle timer.
DisplayRequired 2 Forces the display to be on by resetting the display idle timer.

Windows 8: This flag can only keep a display turned on, it can't turn on a display that's currently off.

UserPresent 4 This value is not supported.

If UserPresent is combined with other ExecutionState values, the call will fail and none of the specified states will be set.

AwaymodeRequired 64 Enables away mode. This value must be specified with Continuous.

Away mode should be used only by media-recording and media-distribution applications that must perform critical background processing on desktop computers while the computer appears to be sleeping.

Windows Server 2003: AwaymodeRequired is not supported.

Continuous 2,147,483,648 Informs the system that the state being set should remain in effect until the next call that uses Continuous and one of the other ExecutionState flags is cleared.

See Also