So when SetSuspendState is called with request for a 'forced' sleep mode, the PBT_APMSUSPEND notification is never broadcast. Only if I set forced parameter to FALSE I receive it.
Any idea why?
PS. PBT_APMRESUMEAUTOMATIC is received in either case.
PS2. PBT_APMSUSPEND is always received when run on Windows Vista/7.
2. While keeping the first process alive, I start another one and perform forced sleep from it: scr_sleep_xp_2.png
and this is where the logic breaks. As you can see, I not only miss my own notification of the system entering the sleep, but also other processes won't get it either.
So my original question, is it done by design? And if so, how can my process (local service) get notified of a system entering a sleep mode on a Windows XP system?
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.