Registers the application to receive power setting notifications for the specific power setting event.
#Include <WinAPIEx.au3>
_WinAPI_RegisterPowerSettingNotification ( $hWnd, $GUID )
$hWnd | Handle to the window that receives the change or notification messages. |
$GUID | The a string that represents a GUID of the power setting for which notifications are to be sent. It may be one of the following values. $GUID_ACDC_POWER_SOURCE $GUID_BATTERY_PERCENTAGE_REMAINING $GUID_IDLE_BACKGROUND_TASK $GUID_MONITOR_POWER_ON $GUID_POWERSCHEME_PERSONALITY $GUID_SYSTEM_AWAYMODE |
Success | A notification handle for unregistering for power notifications. |
失败: | 返回 0 并设置 @error 标志为非 0 值. |
在MSDN中搜索