BOOL SetThreadPriority(HANDLE Handle, int Priorite);
La priorité Priorite peut être THREAD_PRIORITY_ABOVE_NORMAL, THREAD_PRIORITY_BELOW_NORMAL, THREAD_PRIORITY_HIGHEST, THREAD_PRIORITY_IDLE, THREAD_PRIORITY_LOWEST, THREAD_PRIORITY_NORMAL ou THREAD_PRIORITY_TIME_CRITICAL.
#include <windows.h>
#include <winbase.h>
HANDLE Handle;
int Priorite;
Priorite=GetThreadPriority();
...
if (!GetThreadPriority(Priorite))
{
...
}
...
Ne pas utiliser la priorité THREAD_PRIORITY_TIME_CRITICAL.