GetActivePwrScheme function

[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 WINAPI GetActivePwrScheme(
  _Out_ PUINT puiID
);

Parameters

puiID [out]

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

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

PowrProf.h

Library

PowrProf.lib

DLL

PowrProf.dll

See also

Power Schemes
Power Management Functions
SetActivePwrScheme

 

 

Show: