GetActivePwrScheme function (powrprof.h)

[GetActivePwrScheme is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Applications written for Windows Vista and later should use PowerGetActiveScheme instead.]

Retrieves the index of the active power scheme.

Syntax

BOOLEAN GetActivePwrScheme(
  [out] PUINT puiID
);

Parameters

[out] puiID

A pointer to a variable that receives the index of 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

The active power scheme remains active until either the user sets a new power scheme using the Power Options control panel program, or an application calls the SetActivePwrScheme function.

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

Power Management Functions

Power Schemes

SetActivePwrScheme