Setting the priority of VC++ compiler on NT

I want to set the priority of the Visual C compiler as low to improve the performance of my machine during compilation.  I can set it manually through the task manager - but I'd like dev studio to launch it with a low priority to make my life better.

Does anyone know how to do this?

thanks,

matt
matooAsked:
Who is Participating?
 
SampsonCConnect With a Mentor Commented:
I know that Jeffrey Richter's latest "Advanced Windows" book covers it, but I don't have it right in front of me.
0
 
SampsonCCommented:
I would imagine that DevStudio is calling the compiler, linker, etc. with a call to CreateProcess.  I don't see any easy way to modify the priority that DevStudio uses when creating those process.  You could probably hook the CreateProcess call for DevStudio and modify the priority, but that would be a lot of work.
0
 
matooAuthor Commented:
Maybe this is more of an NT operating system question?  is there a way of pre-specifying the priority of a given executable file?
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
SampsonCCommented:
Sure there's a way.  Whoever creates the process specifies the initial priority of the process.  If you create a process with CreateProcess, you can specify the priority of the new process.  That is not NT-specific.  You might be able to find some obscure setting in DevStudio to change the priority with which it creates processes, otherwise it creates them at a certain priority and there's not much you can do about it before the fact.  After they are created, you can change their priority.  If you want to do some really low-level stuff, you can hook CreateProcess and modify the priority yourself before creating the process, but that would be a lot of work.
0
 
matooAuthor Commented:
Any idea how I go about doing this?
0
 
matooAuthor Commented:
I'll check it out - thanks for your help!
0
All Courses

From novice to tech pro — start learning today.