Power Management Functions


GetCurrentPowerPolicies Function

Retrieves the current system power policy settings.

Syntax

C++
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 clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderPowrProf.h
LibraryPowrProf.lib
DLLPowrProf.dll

See Also

Power Schemes
Power Management Functions
GLOBAL_POWER_POLICY
POWER_POLICY
WriteGlobalPwrPolicy
WritePwrScheme

Send comments about this topic to Microsoft

Build date: 10/8/2009

Tags :


Page view tracker