Is there windows api to check whether the computer supports Modern Standby?

leif li 46 Reputation points
2022-04-26T03:30:13.907+00:00

Do not use CMD command(powercfg /a) to view

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,575 questions
{count} votes

Accepted answer
  1. Castorix31 84,281 Reputation points
    2022-04-26T07:07:00.83+00:00

    You can do

                SYSTEM_POWER_CAPABILITIES spc = { 0 };
                NTSTATUS nRet = CallNtPowerInformation(SystemPowerCapabilities, NULL, 0, &spc, sizeof(spc));
    

    and check spc.AoAc

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Xiaopo Yang - MSFT 12,721 Reputation points Microsoft Vendor
    2022-04-26T06:25:16.03+00:00

    Hello,

    Welcome to Microsoft Q&A!

    Have you tried GetDevicePowerState? According to System Power States, Systems that support Modern Standby do not use S1-S3.
    I'm afraid there is no direct WinAPI to check Modern Standby.

    Thank you.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

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.