Can't catch sleep/suspend messages (winXP)

前端 未结 5 1795
死守一世寂寞
死守一世寂寞 2020-12-16 06:38

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

5条回答
  •  执念已碎
    2020-12-16 06:45

    Try to subscribe the PowerModeChanged event:

    How do I check when the computer is being put to sleep or wakes up?

提交回复
热议问题