Asking Windows for real-time priority
Works as intended.
But I get a thread priority of 15 rather than the expected 31 for a REALTIME_PRIORITY_CLASS?
See SetThreadPriority.

It seems that the THREAD_PRIORITY_TIME_CRITICAL is defined to THREAD_BASE_PRIORITY_LOWRT - 1, which could be further elevated to 31 if needed.