Windows Dev Center

PBT_APMQUERYSUSPENDFAILED event

[PBT_APMQUERYSUSPENDFAILED is available for use in the operating systems specified in the Requirements section. Support for this event was removed in Windows Vista. Use SetThreadExecutionState instead.]

Notifies applications that permission to suspend the computer was denied. This event is broadcast if any application or driver returned BROADCAST_QUERY_DENY 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.


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

Parameters

hwnd

A handle to window.

uMsg
ValueMeaning
WM_POWERBROADCAST
536 (0x218)

Message identifier.

 

wParam
ValueMeaning
PBT_APMQUERYSUSPENDFAILED
2 (0x2)

Event identifier.

 

lParam

Reserved; must be zero.

Return value

No return value.

Remarks

Applications typically respond to this event by resuming normal operation.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

End of client support

Windows XP

End of server support

Windows Server 2003

Header

WinUser.h (include Windows.h)

See also

Power Management
Power Management Events
PBT_APMQUERYSUSPEND
WM_POWERBROADCAST

 

 

Community Additions

ADD
Show:
© 2015 Microsoft