Export (0) Print
Expand All
Expand Minimize

GetPwrCapabilities function

Retrieves information about the system power capabilities.

Syntax


BOOLEAN WINAPI GetPwrCapabilities(
  _Out_  PSYSTEM_POWER_CAPABILITIES lpSystemPowerCapabilities
);

Parameters

lpSystemPowerCapabilities [out]

A pointer to a SYSTEM_POWER_CAPABILITIES structure that receives the information.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

This function retrieves detailed information about the current system power management hardware resources and capabilities. This includes information about the presence of hardware features such as power buttons, lid switches, and batteries. Other details returned include information about current power management capabilities and configurations that can change dynamically, such as the minimum sleep state currently supported, which may change as new drivers are introduced into the system, or the presence of the system hibernation file.

This information is also available through the CallNtPowerInformation function, using the SystemPowerCapabilities level.

For more information on using PowrProf.h, see Power Schemes.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Powerbase.h;
PowrProf.h on Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP

Library

PowrProf.lib

DLL

PowrProf.dll

See also

Power Management Functions
CallNtPowerInformation
SYSTEM_POWER_CAPABILITIES

 

 

Community Additions

ADD
Show:
© 2014 Microsoft