Как установить (узнать) приоритет процесса

{
HANDLE procHandle = GetCurrentProcess();
if (!SetPriorityClass(procHandle, HIGH_PRIORITY_CLASS))
RET_ERR("SetPriorityClass");

DWORD priorityClass = GetPriorityClass(procHandle);
ADD_STR("Priority Class is set to : ");
switch(priorityClass)
{
case HIGH_PRIORITY_CLASS:
ADD_STR("HIGH_PRIORITY_CLASS\r\n");
break;
case IDLE_PRIORITY_CLASS:
ADD_STR("IDLE_PRIORITY_CLASS\r\n");
break;
case NORMAL_PRIORITY_CLASS:
ADD_STR("NORMAL_PRIORITY_CLASS\r\n");
break;
case REALTIME_PRIORITY_CLASS:
ADD_STR("REALTIME_PRIORITY_CLASS\r\n");
break;
default:
ADD_STR("Unknown priority class\r\n");
}
return result_buffer;
 
« Предыдущая статья   Следующая статья »