Expand Minimize

WriteProcessorPwrScheme function

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

Writes processor power policy settings for the specified power scheme.

Syntax


BOOLEAN WINAPI WriteProcessorPwrScheme(
  _In_  UINT ID,
  _In_  PMACHINE_PROCESSOR_POWER_POLICY pMachineProcessorPowerPolicy
);

Parameters

ID [in]

The index of the power scheme to be written.

pMachineProcessorPowerPolicy [in]

A pointer to a MACHINE_PROCESSOR_POWER_POLICY structure that contains the power policy settings to be written.

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

This change does not affect the current system power policy. To apply this change to the current system power policy, call the SetActivePwrScheme function, using the index of this power scheme.

Starting with Windows Vista, power management configuration of the system's processor is controlled through the GUID_PROCESSOR_SETTINGS_SUBGROUP power settings subgroup. Use the PowerEnumerate function to enumerate individual settings.

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
MACHINE_PROCESSOR_POWER_POLICY
ReadProcessorPwrScheme

 

 

Community Additions

ADD
Show:
© 2014 Microsoft