101
Developer's Corner / Q1 [Answered] Making a process and then changing its priority
« on: October 31, 2008, 03:06 PM »
Hi there. I'm back to C# and am getting by with web examples and a few books. However I'm stuck.
I've created a process and it happens to be FFMPEG
What I'd like to do is to have this process run in BelowNormal processor priority. I've found some things in the intelitext about it, but msdn isn't really helping me.
Psudo code would be
proc.Start();
proc.processorpriority = priority.BelowNormal;
But it isn't that easy...
Thanks for any help
I've created a process and it happens to be FFMPEG
Code: C# [Select]
- //Some rubbish but long code removed
- proc.EnableRaisingEvents = false;
- proc.StartInfo.FileName = ffmpegLocation;
- proc.StartInfo.Arguments = arguement;
- proc.StartInfo.UseShellExecute = false;
- if (showEncodingEngine)
- {
- proc.StartInfo.CreateNoWindow = false;
- }
- else
- {
- proc.StartInfo.CreateNoWindow = true;
- }
- proc.StartInfo.RedirectStandardOutput = false;
- proc.StartInfo.RedirectStandardInput = false;
- proc.StartInfo.RedirectStandardError = false;
- proc.Start();
- proc.WaitForExit();
- proc.Close();
What I'd like to do is to have this process run in BelowNormal processor priority. I've found some things in the intelitext about it, but msdn isn't really helping me.
Psudo code would be
proc.Start();
proc.processorpriority = priority.BelowNormal;
But it isn't that easy...
Thanks for any help