In Windows 7, I see that a call SetThreadExecutionStatewith a parameter ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_AWAYMODE_REQUIREDprevents the user from manually shutting down the system.
When I open the Start menu and select "Sleep", the display turns off, but my application continues processing. This is evident due to the fact that the fan continues to run at full speed and after waking up the computer, I see that the operations that were performed during sleep progressed.
How can I allow the user to manually put my computer into sleep mode while it is working SetThreadExecutionState?
source
share