WM_POWERBROADCAST  1JMPUUD 

The WM_POWERBROADCAST message is sent to an application to notify it of power-management events.

dwPowerEvent = (DWORD) wParam;
dwData = (DWORD) lParam;
 

Parameters

dwPowerEvent

Event notification message. This parameter can be one of the following values:

Value

Meaning

PBT_APMBATTERYLOW2DJ6J14

Battery power is low.

PBT_APMOEMEVENT42C2G6W

OEM-defined event occurred.

PBT_APMPOWERSTATUSCHANGE1N6XJYY

Power status has changed.

PBT_APMQUERYSUSPEND6WJK0.

Request for permission to suspend.

PBT_APMQUERYSUSPENDFAILED1N8KIX4

Suspension request denied.

PBT_APMRESUMECRITICALW6.9ZN

Operation resuming after critical suspension.

PBT_APMRESUMESUSPENDO23VS8

Operation resuming after suspension.

PBT_APMSUSPENDQ98B9O

System is suspending operation.

 

dwData

Function-specific data. For most messages, this parameter is reserved and not used.

However, if wParam is one of the resume notifications (PBT_APMRESUME*), the lParam parameter can specify the PBTF_APMRESUMEFROMFAILURE flag. This flag indicates that a suspend operation failed after the PBT_APMSUSPEND message was sent.

 

Return Values

Return TRUE to grant a request.

Return BROADCAST_QUERY_DENY to deny a request.