Skip to main content
GameDev.net gamedev.net
🔒 Locked

Setting the priority for the application...

Started by monkeyman Nov 11, 2000 at 2:14 PM 2 replies 650+ views
Original Post
monkeyman
monkeyman
I hope someone has the answer to this, because I can''t find it.. By default, Windows sets your Win32 app to NORMAL_PRIORITY_CLASS..I''m trying to set that to HIGH_PRIORITY_CLASS, but can''t figure it out.. It appears that there are 2 ways of doing this, setting the priority within the app itself, or spawning the app from another app and specifying the priority level.. INSIDE THE APP: I can get the DWORD value of the current thread and/or process..there are functions to get and set priority using a HANDLE to threads and processes, but not the DWORD id..if I could convert the id to a handle, I could change the priority of the app from within the app itself.. SPAWNING THE APP: I''ve tried using CreateProcess, but I''m not sure about all the parameters..it doesn''t crash, it just returns false.. I know someone out there has done this..if nothing else, maybe people will get excited about the potential extra performance and join me in my quest for knowledge "Like all good things, it starts with a monkey.."
"Like all good things, it starts with a monkey.."
monkeyman
monkeyman
That was EXACTLY what I needed

"Like all good things, it starts with a monkey.."
"Like all good things, it starts with a monkey.."
Shannon Barber
Shannon Barber
hehe setting the priority class to high got me +.6fps
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.