PO_SPR_ACTIVE_SESSION_DATA structure (ntpoapi.h)
Stores information that indicates whether a System Power Report's Active Session is starting or ending.
Syntax
typedef struct _PO_SPR_ACTIVE_SESSION_DATA {
BOOLEAN Start;
GUID ActiveSessionGuid;
} PO_SPR_ACTIVE_SESSION_DATA, *PPO_SPR_ACTIVE_SESSION_DATA;
Members
Start
A boolean value that indicates whether the session is starting or ending.
ActiveSessionGuid
The Active session GUID for the session.
Remarks
To register for System Power Report's Active Session notifications, you must call PowerSettingRegisterNotification function with these values:
- SettingGuid: Pass GUID_SPR_ACTIVE_SESSION_CHANGE.
- Flags: Set to DEVICE_NOTIFY_CALLBACK.
- Recipient: A DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS structure, in which the Callback member is set to your implementation of the DEVICE_NOTIFY_CALLBACK_ROUTINE callback routine that gets called when the session starts or ends.
If the registration is successful, the DEVICE_NOTIFY_CALLBACK_ROUTINE callback is invoked with these value:
- Type: PBT_POWERSETTINGCHANGE to indicate a power setting change.
- UpdateSetting: Is a POWERBROADCAST_SETTING structure; the PowerSetting member is set to GUID_SPR_ACTIVE_SESSION_CHANGE, the DataLength member is a _PO_SPR_ACTIVE_SESSION_DATA structure.
Requirements
Requirement | Value |
---|---|
Header | ntpoapi.h |