8

任何人都可以提供更改进程优先级的代码的 Delphi 示例吗?

我需要从 Windows XP 任务管理器中按名称获取进程,并使用 delphi 代码更改其优先级。

4

1 回答 1

12

您必须使用SetPriorityClass函数。

此功能是 windows 单元的一部分,这是一个示例

SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);
于 2011-12-19T19:13:21.203 回答