PowerSettingRegisterNotification function
Registers to receive notification when a power setting changes.
Syntax
DWORD WINAPI PowerSettingRegisterNotification( _In_ LPCGUID SettingGuid, _In_ DWORD Flags, _In_ HANDLE Recipient, _Out_ PHPOWERNOTIFY RegistrationHandle );
Parameters
- SettingGuid [in]
-
A GUID that represents the power setting.
- Flags [in]
-
Information about the recipient of the notification. This parameter can be one of the following values:
Value Meaning - DEVICE_NOTIFY_SERVICE_HANDLE
The Recipient parameter is a handle to a service.Use the CreateService or OpenService function to obtain this handle.
- DEVICE_NOTIFY_CALLBACK
The Recipient parameter is a pointer to a callback function to call when the power setting changes.
- Recipient [in]
-
A handle to the recipient of the notifications.
- RegistrationHandle [out]
-
A handle to the registration. Use this handle to unregister for notifications.
Return value
Returns ERROR_SUCCESS (zero) if the call was successful, and a nonzero value if the call failed.
Requirements
Minimum supported client | Windows 7 [desktop apps only] |
---|---|
Minimum supported server | Windows Server 2008 R2 [desktop apps only] |
Header |
|
Library |
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 10/16/2012