术语 | setthreadpriorityboost |
释义 | SetThreadPriorityBoost 语法: C++ BOOL WINAPI SetThreadPriorityBoost( __in HANDLE hThread, __in BOOL DisablePriorityBoost ); SetThreadPriorityBoost功能 禁用或使该系统能够暂时提高线程的优先级。 参数 hThread [in] 一个句柄,线程的优先事项是提高。句柄必须有THREAD_SET_INFORMATION或THREAD_SET_LIMITED_INFORMATION访问权限。有关更多信息,请参见线程安全和访问权限。 Windows Server 2003和Windows XP/2000操作系统:在处理必须有THREAD_SET_INFORMATION访问权限。 DisablePriorityBoost [in] 如果此参数为true,动态的提高被禁用。如果该参数为FALSE,动态的提高已启用。 返回值 如果函数成功,返回值为非零。 如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。 备注 当一个线程处于充满活力的运行优先类之一,该系统暂时如鱼得水,线程的优先级是考虑一个等待状态了。如果SetThreadPriorityBoost是设置为TRUE DisablePriorityBoost参数调用的线程的优先级不提高。要恢复正常的行为,呼吁SetThreadPriorityBoost与DisablePriorityBoost设置为FALSE。 要求: 最低支持:client-Windows 2000专业版 最低支持server-Windows 2000服务器 HeaderWinbase.h(头文件:winuser.h) LibraryKernel32.lib DLLKernel32.dll 参见 GetThreadPriorityBoost OpenThread 优先Boosts 进程和线程函数 调度优先级 主题 如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com) 生成日期:2009年8月27日 ==英文原文==SetThreadPriorityBoost Function Disables or enables the ability of the system to temporarily boost the priority of a thread. Syntax C++ BOOL WINAPI SetThreadPriorityBoost( __in HANDLE hThread, __in BOOL DisablePriorityBoost ); Parameters hThread [in] A handle to the thread whose priority is to be boosted. The handle must have the THREAD_SET_INFORMATION or THREAD_SET_LIMITED_INFORMATION access right. For more information, see Thread Security and Access Rights . Windows Server 2003 and Windows XP/2000: The handle must have the THREAD_SET_INFORMATION access right. DisablePriorityBoost [in] If this parameter is TRUE, dynamic boosting is disabled. If the parameter is FALSE, dynamic boosting is enabled. 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 When a thread is running in one of the dynamic priority classes, the system temporarily boosts the thread's priority when it is taken out of a wait state. If SetThreadPriorityBoost is called with the DisablePriorityBoost parameter set to TRUE, the thread's priority is not boosted. To restore normal behavior, call SetThreadPriorityBoost with DisablePriorityBoost set to FALSE. Requirements Minimum supported clientWindows 2000 Professional Minimum supported serverWindows 2000 Server HeaderWinbase.h (include Windows.h) LibraryKernel32.lib DLLKernel32.dll See Also GetThreadPriorityBoost OpenThread Priority Boosts Process and Thread Functions Scheduling Priorities Threads Send comments about this topic to Microsoft Build date: 8/27/2009 ==原始网址==http://msdn.microsoft.com/en-us/library/ms686280(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。