ReadPwrScheme function (powrprof.h)

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

Retrieves the power policy settings that are unique to the specified power scheme.

Syntax

BOOLEAN ReadPwrScheme(
  [in]  UINT          uiID,
  [out] PPOWER_POLICY pPowerPolicy
);

Parameters

[in] uiID

The index of the power scheme to be read.

[out] pPowerPolicy

A pointer to a POWER_POLICY structure that receives the power policy settings.

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

If the power scheme specified does not exist, the function returns FALSE.

To retrieve information about the power policy settings currently in use by the system, call the GetActivePwrScheme function. To retrieve additional information about the current power policy settings, call the CallNtPowerInformation function.

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

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

GetActivePwrScheme

POWER_POLICY

Power Management Functions

Power Schemes

WritePwrScheme