CallNtPowerInformation -> SystemPowerInformation -> TimeRemaining returning 0 on Windows11

Neha Gupta 0 Reputation points
2023-09-14T04:01:45.6366667+00:00

Hi,

I use CallNtPowerInformation to get SystemPowerInformation and check TimeRemaining to take machine to low power state.
For windows 11, after a system restart am getting CallNtPowerInformation -> SystemPowerInformation -> TimeRemaining = 0, that takes my machine to hibernate state. When i start from there then this API starts returning correct value i.e. 0xffffffff.
This all used to work as expected before Windows11.

Can anyone throw some light on it, why this behavior and how can i fix it.

Sysinternals
Sysinternals
Advanced system utilities to manage, troubleshoot, and diagnose Windows and Linux systems and applications.
1,258 questions
Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.