I have a service, developed in C++ running on Windows 8 (and 8.1). How can I get to know that the system has entered Connected Standby?
Since this is a service, it does not have a window, I should be using PowerRegisterSuspendResumeNotification, but it does not seem to be working. Does anyone know how I can get such a notification?
This is excruciating unable to comment!!
CallNtPowerInformation(SystemPowerCapabilities, ...)
will returnSYSTEM_POWER_CAPABILITIES
. It has anBOOLEAN
memberAoAc
, if it isFALSE
, your system does not support connected standby.It worked for me on an Intel custom hardware(same as machines in market).
AoAc
= Always On Always Connected, Intel's preference.I was not allowed to comment, surprise am allowed to provide answer. This not answer definitely, but discussion.
Do you not receive notification for
PBT_APMSUSPEND
,PBT_APMRESUMESUSPEND
andPBT_APMRESUMEAUTOMATIC
in you callback?After going through http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/26629db2-6d33-427c-a767-8c857d775079/windows-8-connected-standby-and-aoac?forum=wdk
it appears, applications need not differentiate between S3 and CS mode(a.k.a AOAC, always on, always connected.). Though it is not clear if network activity is allowed in CS.
Couldn't find any offical solution of this to date. In my case detecting SessionSwitch with lock/unlock reasons was a good enough supplement:
I have contacted Microsoft's technical support. This is their answer:
Looks like there is only a workaround for this by listening to screen on/off events.