Esempio n. 1
0
        public void SetPriority(Priority priority)
        {
            IntPtr        processHandle = Process.GetProcessById(ProcessId).GetHandle();
            PriorityClass priorityClass = priority.GetPriorityClass();

            NativeMethods.SetPriorityClass(processHandle, priorityClass);
        }
Esempio n. 2
0
        public void SetPriority(Priority priority)
        {
            var process = Process;

            if (process != null)
            {
                NativeMethods.SetPriorityClass(process.GetHandle(), priority.GetPriorityClass());
            }
        }
Esempio n. 3
0
        public void SetPriority(Priority priority)
        {
            var process = Process;

            if (process != null)
            {
                Kernel32.SetPriorityClass(process.GetHandle(), priority.GetPriorityClass());
            }
            State.Priority = priority;
        }