Platform SDK: Hardware |
The PBT_APMSUSPEND event is broadcast immediately before the computer enters a suspended state. This event is typically broadcast when all applications and installable drivers have returned TRUE to a previous PBT_APMQUERYSUSPEND event.
A window receives this event through the WM_POWERBROADCAST message. The wParam and lParam parameters are set as described following.
No return value.
An application should process this event by completing all tasks necessary to save data. This event may also be broadcast, without a prior PBT_APMQUERYSUSPEND event, if an application or device driver uses the SetSystemPowerState function to force suspension.
The system allows approximately 20 seconds for an application to handle this notification. If an application is still performing operations after its time allotment has expired, the system may interrupt the application.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Pbt.h.
Power Management Overview, Power Management Events, PBT_APMQUERYSUSPEND, SetSystemPowerState, WM_POWERBROADCAST