PowerSetActiveScheme function

Sets the active power scheme for the current user.

Syntax


DWORD WINAPI PowerSetActiveScheme(
  _In_opt_       HKEY UserRootPowerKey,
  _In_     const GUID *SchemeGuid
);

Parameters

UserRootPowerKey [in, optional]

This parameter is reserved for future use and must be set to NULL.

SchemeGuid [in]

The identifier of the power scheme.

Return value

Returns ERROR_SUCCESS (zero) if the call was successful, and a nonzero value if the call failed.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Powersetting.h;
PowrProf.h on Windows Server 2008 R2, Windows 7, Windows Server 2008 and Windows Vista

Library

PowrProf.lib

DLL

PowrProf.dll

See also

Power Management Functions

 

 

Show: