public void SetPriority(Priority priority) { IntPtr processHandle = Process.GetProcessById(ProcessId).GetHandle(); PriorityClass priorityClass = priority.GetPriorityClass(); NativeMethods.SetPriorityClass(processHandle, priorityClass); }
public void SetPriority(Priority priority) { var process = Process; if (process != null) { NativeMethods.SetPriorityClass(process.GetHandle(), priority.GetPriorityClass()); } }
public void SetPriority(Priority priority) { var process = Process; if (process != null) { Kernel32.SetPriorityClass(process.GetHandle(), priority.GetPriorityClass()); } State.Priority = priority; }