Export (0) Print
Expand All

PBT_APMRESUMESUSPEND event

Notifies applications that the system has resumed operation after being suspended.

A window receives this event through the WM_POWERBROADCAST message. The wParam and lParam parameters are set as described following.


LRESULT 
CALLBACK 
WindowProc( HWND hwnd,      // handle to window
            UINT uMsg,      // WM_POWERBROADCAST
            WPARAM wParam,  // PBT_APMRESUMESUSPEND
            LPARAM lParam); // zero

Parameters

hwnd

A handle to window.

uMsg
ValueMeaning
WM_POWERBROADCAST
536 (0x218)

Message identifier.

 

wParam
ValueMeaning
PBT_APMRESUMESUSPEND
7 (0x7)

Event identifier.

 

lParam

Reserved; must be zero.

Return value

No return value.

Remarks

An application can receive this event only if it received the PBT_APMSUSPEND event before the computer was suspended. Otherwise, the application will receive a PBT_APMRESUMECRITICAL event.

If the system wakes due to user activity (such as pressing the power button) or if the system detects user interaction at the physical console (such as mouse or keyboard input) after waking unattended, the system first broadcasts the PBT_APMRESUMEAUTOMATIC event, then it broadcasts the PBT_APMRESUMESUSPEND event. In addition, the system turns on the display. Your application should reopen files that it closed when the system entered sleep and prepare for user input.

If the system wakes due to an external wake signal (remote wake), the system broadcasts only the PBT_APMRESUMEAUTOMATIC event. The PBT_APMRESUMESUSPEND event is not sent.

Windows Server 2003 and Windows XP:  If an application called SetSystemPowerState with fForce set to TRUE or the system performed a critical suspend, the system will broadcast a PBT_APMRESUMECRITICAL event after waking.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

WinUser.h (include Windows.h)

See also

System Wake-up Events
Power Management Events
PBT_APMSUSPEND
PBT_APMRESUMECRITICAL
WM_POWERBROADCAST

 

 

Community Additions

ADD
Show:
© 2014 Microsoft