Setting Priority Class
-
Hello, all. I'm trying to have the program I'm writing raise its class and thread priorities on a button click. I can change the thread priorities just fine, but I'm having trouble with the priority class. Here's the code from the function that I'm using to change the priorities: HANDLE Hand; BOOL Check; DWORD Error; Hand = GetCurrentThread(); Check = SetPriorityClass(Hand, HIGH_PRIORITY_CLASS); Error = GetLastError(); Check = SetThreadPriority(Hand, THREAD_PRIORITY_HIGHEST); Error = GetLastError(); Does anybody have any idea why I can change the thread priority but not the priority class? Thanks, Phillip
-
Hello, all. I'm trying to have the program I'm writing raise its class and thread priorities on a button click. I can change the thread priorities just fine, but I'm having trouble with the priority class. Here's the code from the function that I'm using to change the priorities: HANDLE Hand; BOOL Check; DWORD Error; Hand = GetCurrentThread(); Check = SetPriorityClass(Hand, HIGH_PRIORITY_CLASS); Error = GetLastError(); Check = SetThreadPriority(Hand, THREAD_PRIORITY_HIGHEST); Error = GetLastError(); Does anybody have any idea why I can change the thread priority but not the priority class? Thanks, Phillip
-
BOOL SetPriorityClass( HANDLE hProcess, // handle to the process DWORD dwPriorityClass // priority class value ); GetCurrentProcess will give u the handle of the current process Papa while (TRUE) Papa.WillLove ( Bebe ) ;