GetCurrentPowerPolicies function (powrprof.h)

Retrieves the current system power policy settings.

Syntax

BOOLEAN GetCurrentPowerPolicies(
  [out] PGLOBAL_POWER_POLICY pGlobalPowerPolicy,
  [out] PPOWER_POLICY        pPowerPolicy
);

Parameters

[out] pGlobalPowerPolicy

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

[out] pPowerPolicy

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

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header powrprof.h
Library PowrProf.lib
DLL PowrProf.dll

See also

GLOBAL_POWER_POLICY

POWER_POLICY

Power Management Functions

Power Schemes

WriteGlobalPwrPolicy

WritePwrScheme