Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[WriteGlobalPwrPolicy 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 global power policy settings.
BOOLEAN WriteGlobalPwrPolicy(
[in] PGLOBAL_POWER_POLICY pGlobalPowerPolicy
);
[in] pGlobalPowerPolicy
A pointer to a GLOBAL_POWER_POLICY structure that contains the power policy settings to be written.
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.
The function replaces any existing global power policy settings. Each user has a separate global power scheme, which contains power policy settings that apply to all power schemes for that user.
Starting with Windows Vista, use the PowerEnumerate function to enumerate power settings for a specified scheme and the power write functions to write individual settings.
For more information on using PowrProf.h, see Power Schemes.
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 |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today