WM_POWER

3.1

WM_POWER
fwPowerEvt = wParam;    /* power-event notification message */

The WM_POWER message is sent when the system, typically a battery-powered personal computer, is about to enter the suspended mode.

Parameters

fwPowerEvt

Value of wParam. Specifies a power-event notification message. This parameter may be one of the following values:

Value Meaning

PWR_SUSPENDREQUEST Indicates that the system is about to enter the suspended mode.
PWR_SUSPENDRESUME Indicates that the system is resuming operation after entering the suspended mode normally—that is, the system sent a PWR_SUSPENDREQUEST notification message to the application before the system was suspended. An application should perform any necessary recovery actions.
PWR_CRITICALRESUME Indicates that the system is resuming operation after entering the suspended mode without first sending a PWR_SUSPENDREQUEST notification message to the application. An application should perform any necessary recovery actions.

Return Value

The value an application should return depends on the value of the wParam parameter, as follows:

Value of wParam Return Value

PWR_SUSPENDREQUEST PWR_FAIL to prevent the system from entering the suspended state; otherwise PWR_OK
PWR_SUSPENDRESUME 0
PWR_CRITICALRESUME 0

Comments

This message is sent only to an application that is running on a system that conforms to the advanced power management (APM) basic input-and-output system (BIOS) specification. The message is sent by the power-management driver to each window returned by the EnumWindows function.

The suspended mode is the state in which the greatest amount of power savings occurs, but all operational data and parameters are preserved. Random-access memory (RAM) contents are preserved, but many devices are likely to be turned off.

See Also

EnumWindows