windows - SetThreadExecutionState preventing manual sleep -
on windows 7, i'm seeing call setthreadexecutionstate
parameter es_continuous | es_system_required | es_awaymode_required
preventing user manually putting system sleep.
upon opening start menu , selecting 'sleep,' display turns off, application continues processing. evident fact fan continues @ full speed , upon waking computer, can see operations being carried out when sleep occurred have progressed.
how can allow user manually put computer sleep while setthreadexecutionstate
in effect?
inclusion of es_awaymode_required option causes problem. quoting msdn article:
the es_awaymode_required value should used when absolutely necessary media applications require system perform background tasks such recording television content or streaming media other devices while system appears sleeping. applications not require critical background processing or run on portable computers should not enable away mode because prevents system conserving power entering true sleep.
Comments
Post a Comment