Expand Minimize

GetCurrentPowerPolicies function

Retrieves the current system power policy settings.

Syntax


BOOLEAN WINAPI GetCurrentPowerPolicies(
  _Out_  PGLOBAL_POWER_POLICY pGlobalPowerPolicy,
  _Out_  PPOWER_POLICY pPowerPolicy
);

Parameters

pGlobalPowerPolicy [out]

A pointer to a GLOBAL_POWER_POLICY structure that receives the current global power policy settings.

pPowerPolicy [out]

A pointer to a POWER_POLICY structure that receives the power policy settings that are unique to the active power scheme.

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

To update the current power policy settings, call the WriteGlobalPwrPolicy or WritePwrScheme functions.

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

PowrProf.h

Library

PowrProf.lib

DLL

PowrProf.dll

See also

Power Schemes
Power Management Functions
GLOBAL_POWER_POLICY
POWER_POLICY
WriteGlobalPwrPolicy
WritePwrScheme

 

 

Community Additions

ADD
Show:
© 2014 Microsoft