GetCurrentPowerPolicies Function
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 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: 11/19/2009

© 2010 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View