[This is preliminary documentation and subject to change.]
The PBT_APMQUERYSUSPEND message is sent to request permission to suspend the computer. An application that grants permission should carry out preparations for the suspension before returning. A window receives this message through the WM_POWERBROADCAST message.
Flags = (DWORD) lParam;
Return TRUE to grant the request to suspend. To deny the request, return BROADCAST_QUERY_DENY.
An application should process this message by first determining whether permission to suspend can be granted. It must not grant permission if doing so would cause a loss of data. The application can prompt the user for directions on how to prepare for suspension only if bit 0 in the Flags parameter is set.
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, WM_POWERBROADCAST