MCPcopy Create free account
hub / github.com/JHRobotics/softgpu / version_is_nt

Function version_is_nt

windrv.c:391–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389 */
390typedef BOOL (WINAPI * GetThreadPriorityBoostF)(HANDLE hThread, PBOOL pDisablePriorityBoost);
391BOOL version_is_nt()
392{
393 HANDLE h = GetModuleHandleA("kernel32.dll");
394 if(h)
395 {
396 GetThreadPriorityBoostF GetThreadPriorityBoostH = (GetThreadPriorityBoostF)GetProcAddress(h, "GetThreadPriorityBoost");
397 if(GetThreadPriorityBoostH != NULL)
398 {
399 BOOL junk;
400 if(GetThreadPriorityBoostH(GetCurrentThread(), &junk))
401 {
402 return TRUE;
403 }
404
405 if(GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
406 {
407 return TRUE;
408 }
409 }
410 }
411
412 return FALSE;
413}
414
415#ifdef SETUPAPI_DYN
416static HMODULE hSETUPAPI = NULL;

Callers 2

softgpu_sysinfoFunction · 0.85
version_winFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected