Change
the priority of your application
Give it the highest priority:
SetPriorityClass(GetCurrentProcess,
REALTIME_PRIORITY_CLASS);
SetThreadPriority(GetCurrentThread,
THREAD_PRIORITY_TIME_CRITICAL);
Restore the normal priority:
SetThreadPriority(GetCurrentThread,
THREAD_PRIORITY_NORMAL);