Earlier, when we call SetThreadExecutionState(ES_SYSTEM_REQUIRED) without ES_CONTINUOUS, it reset the system idle timer. But in Windows 11, that doesn't work anymore.
I need the reset the idle timer, and I wonder, how can I do it now?
Earlier, when we call SetThreadExecutionState(ES_SYSTEM_REQUIRED) without ES_CONTINUOUS, it reset the system idle timer. But in Windows 11, that doesn't work anymore.
I need the reset the idle timer, and I wonder, how can I do it now?
According to the Doc:System Sleep Criteria
When you clear
ES_SYSTEM_REQUIRED flag, will allow the system to idle to sleep normally. If the system idle timer is greater than the system time-out value and without ES_SYSTEM_REQUIRED flag, the system enters sleep.