I have an application which starts a bunch of other processes. I need one of these processes to be "high-priority" as it is a real-time application (though it's not an embedded machine so I don't want to use real-time priority).
I stole mordoran's code and tried it as-is, with notepad (with HIGH_PRIORITY_CLASS), and also with a console app (with HIGH_PRIORITY_CLASS | CREATE_NEW_CONSOLE, on the off chance that it would make an unexpected difference. It didn't.) Both ran at high priority.
I'm working on a Windows Server 2003 device, so maybe that is the difference. I've also found that the scheduler that I'm using may be over-writing the priorities that I am trying to establish once it's already started.