在服务中设置线程优先级没有效果

发布于 2024-07-08 11:04:45 字数 1489 浏览 7 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

四叶草在未来唯美盛开 2024-07-15 11:04:45

也许您没有正确的访问权限? SetThreadPriority 上的 MSDN 说:

hThread [in] 线程句柄
要设置其优先级值。

句柄必须有
THREAD_SET_INFORMATION 或
THREAD_SET_LIMITED_INFORMATION 访问权限
正确的。 有关更多信息,请参阅
线程安全和访问权限。

Windows Server 2003 和 Windows
XP/2000:手柄必须具有
THREAD_SET_INFORMATION 访问权限。

Maybe you don't have the correct access rights? MSDN on SetThreadPriority says:

hThread [in] A handle to the thread
whose priority value is to be set.

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文