REASON_CONTEXT structure
Contains information about a power request. This structure is used by the PowerCreateRequest and SetWaitableTimerEx functions.
Syntax
typedef struct _REASON_CONTEXT { ULONG Version; DWORD Flags; union { struct { HMODULE LocalizedReasonModule; ULONG LocalizedReasonId; ULONG ReasonStringCount; LPWSTR *ReasonStrings; } Detailed; LPWSTR SimpleReasonString; } Reason; } REASON_CONTEXT, *PREASON_CONTEXT;
Members
- Version
-
The version number of the structure. This parameter must be set to POWER_REQUEST_CONTEXT_VERSION.
- Flags
-
The format of the reason for the power request. This parameter can be one of the following values:
- Reason
-
A union that consists of either a Detailed structure or a string.
- Detailed
-
A structure that identifies a localizable string resource to describe the reason for the power request.
- LocalizedReasonModule
-
The module that contains the string resource.
- LocalizedReasonId
-
The ID of the string resource.
- ReasonStringCount
-
The number of strings in the ReasonStrings parameter.
- ReasonStrings
-
An array of strings to be substituted in the string resource at run time.
- SimpleReasonString
-
A non-localized string that describes the reason for the power request.
Requirements
|
Minimum supported client |
Windows 7 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2008 R2 [desktop apps only] |
|
Header |
|
See also