网站首页  词典首页

请输入您要查询的函数:

 

术语 setactivepwrscheme
释义 SetActivePwrScheme
语法:
C++
BOOLEAN WINAPI SetActivePwrScheme(
__in UINT uiID,
__in_opt PGLOBAL_POWER_POLICY lpGlobalPowerPolicy,
__in_opt PPOWER_POLICY lpPowerPolicy
);
SetActivePwrScheme功能
[SetActivePwrScheme都可以在指定的要求部分使用的操作系统。它可能被改变或在后续版本中不可用。为Windows Vista编写的应用程序,后来应使用PowerSetActiveScheme代替。]
设置有功计划。
参数
uiID [in]
该项权力的计划指标被激活。
lpGlobalPowerPolicy [中,可选]
一个可选GLOBAL_POWER_POLICY结构,可提供全球电力策略设置指针合并计划的权力时,它变得活跃。
lpPowerPolicy [中,可选]
一个可选POWER_POLICY结构,提供电源策略设置指针合并计划的权力时,它变得活跃。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
使用此功能,使长期变化的系统配置。暂时保持系统运行,而应用程序执行任务,使用SetThreadExecutionState功能。
如果电源计划,uiID不存在,函数返回零指定。
如果lpGlobalPowerPolicy为NULL,则函数使用目前的全球权力的政策WriteGlobalPwrPolicy设置设置。否则,在指定的结构设置,取代目前的全球大国的策略设置。
如果lpPowerPolicy为NULL,则函数使用的电源使用方案,目前的政权策略设置。否则,在指定的结构设置,取代目前的电源策略设置。
有关使用PowrProf.h信息,请参见电源使用方案。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderPowrProf.h
LibraryPowrProf.lib
DLLPowrProf.dll
参见
GetActivePwrScheme
GLOBAL_POWER_POLICY
电源管理功能
POWER_POLICY
电源使用方案
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==SetActivePwrScheme Function
[SetActivePwrScheme 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 PowerSetActiveScheme instead.]
Sets the active power scheme.
Syntax
C++
BOOLEAN WINAPI SetActivePwrScheme(
__in UINT uiID,
__in_opt PGLOBAL_POWER_POLICY lpGlobalPowerPolicy,
__in_opt PPOWER_POLICY lpPowerPolicy
);
Parameters
uiID [in]
The index of the power scheme to be activated.
lpGlobalPowerPolicy [in, optional]
A pointer to an optional GLOBAL_POWER_POLICY structure, which provides global power policy settings to be merged with the power scheme when it becomes active.
lpPowerPolicy [in, optional]
A pointer to an optional POWER_POLICY structure, which provides power policy settings to be merged with the power scheme when it becomes active.
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
Use this function to make long-term changes to the system configuration. To temporarily keep the system running while an application is performing a task, use the SetThreadExecutionState function.
If the power scheme specified by uiID does not exist, the function returns zero.
If lpGlobalPowerPolicy is NULL, the function uses the current global power policy settings set by WriteGlobalPwrPolicy . Otherwise, the settings in the specified structure replace the current global power policy settings.
If lpPowerPolicy is NULL, the function uses the current power policy settings for the power scheme. Otherwise, the settings in the specified structure replace the current power policy settings.
For more information on using PowrProf.h, see Power Schemes .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderPowrProf.h
LibraryPowrProf.lib
DLLPowrProf.dll
See Also
GetActivePwrScheme
GLOBAL_POWER_POLICY
Power Management Functions
POWER_POLICY
Power Schemes
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa373200(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:21:57