This topic has not yet been rated - Rate this topic

ReadGlobalPwrPolicy function

[ReadGlobalPwrPolicy is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. See Remarks.]

Applies to: desktop apps only

Retrieves the current global power policy settings.

Syntax

BOOLEAN WINAPI ReadGlobalPwrPolicy(
  __out  PGLOBAL_POWER_POLICY pGlobalPowerPolicy
);

Parameters

pGlobalPowerPolicy [out]

A pointer to a GLOBAL_POWER_POLICY 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

The GLOBAL_POWER_POLICY structure contains policy settings that are common to all power schemes. This structure contains both user and computer policy settings.

Starting with Windows Vista, use the PowerEnumerate function to enumerate power settings for a specified scheme and the power read functions to retrieve individual settings.

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

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Header

PowrProf.h

Library

PowrProf.lib

DLL

PowrProf.dll

See also

Power Management Functions
GLOBAL_POWER_POLICY
WriteGlobalPwrPolicy

 

 

Send comments about this topic to Microsoft

Build date: 2/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ