[This is preliminary documentation and subject to change.]
The PBT_APMSUSPEND is sent immediately before the computer enters a suspended state. This message is typically sent when all applications and installable drivers have returned TRUE to a previous PBT_APMQUERYSUSPEND message. A window receives this message through the WM_POWERBROADCAST message.
dwData = (DWORD) lParam;
No return value.
An application should process this message by completing all tasks necessary to save data. This message may also be sent, without a prior PBT_APMQUERYSUSPEND message, if an application or device driver uses the SetSystemPowerState function to force suspension.
Windows NT: Requires version 5.0 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in pbt.h.
Power Management Overview, Power Management Messages, PBT_APMQUERYSUSPEND, SetSystemPowerState, WM_POWERBROADCAST