You can affect the thread priority using the CeSetThreadPriority() API. The priority can range from 0 to 255, with 0 being the highest priority.
Additionally, you can adjust the thread quantum (default timeslice) using the CeSetThreadQuantum() API. The default quantum is 100 ms.
HANDLE hThread = CreateThread(NULL, NULL, MyFunc, NULL, 0);
CeSetThreadPriority(hThread, 0); // highest priority
CeSetThreadQuantum(hThread, 10); // 10ms quantum
I'd like to add a note of caution as well. Adjusting thread priority and/or quantum can have adverse performance effects on other processes and if the thread code is not clean, it can have an adverse effect on the entire OS.
-----------------
Chris Tacke, eMVP
Applied Data Support