My app needs to block sleep/hibernate mode. I have the code in place, but after successfully catching the WM_POWERBROADCAST message, neither PBT_APM
Are you running on Vista or Windows Server 2008? This page says
Due to changes in the Power Management Model for Windows Vista and Windows Server 2008, the PBT-APMQUERYSUSPEND event is no longer delivered to applications. Instead the BT_APMSUSPEND event is delivered...
Could that be why you're not seeing it?