Function Reference


Registers the application to receive power setting notifications for the specific power setting event

#include <WinAPISys.au3>
_WinAPI_RegisterPowerSettingNotification ( $hWnd, $sGUID )


$hWnd Handle to the window that receives the change or notification messages.
$sGUID The string that represents a GUID of the power setting for which notifications are to be sent.
It may be one of the following values.

Return Value

Success: A notification handle for unregistering for power notifications.
Failure: 0, call _WinAPI_GetLastError() to get extended error information.


After calling this function, notifications are sent to the specified window using WM_POWERBROADCAST
messages with a wParam parameter of PBT_POWERSETTINGCHANGE.
    (see MSDN for more information)

This function requires Windows Vista or later.

See Also

Search RegisterPowerSettingNotification in MSDN Library.