| 20 | } |
| 21 | |
| 22 | void CNM_App::CheckScreenProtection(HWND hWnd) |
| 23 | { |
| 24 | if (!GetScreenProtectionStatus(hWnd)) |
| 25 | return; |
| 26 | |
| 27 | auto dwAffinity = 0UL; |
| 28 | auto bRet = g_winapiApiTable->GetWindowDisplayAffinity(hWnd, &dwAffinity); |
| 29 | DEBUG_LOG(LL_SYS, "hWnd: %p Current protection status ret: %d affinity: %u", bRet, dwAffinity); |
| 30 | |
| 31 | if (!bRet) |
| 32 | return; |
| 33 | |
| 34 | // while (1) |
| 35 | { |
| 36 | if (dwAffinity != WDA_MONITOR) |
| 37 | { |
| 38 | g_nmApp->OnCloseRequest(EXIT_ERR_SCREEN_PROTECTION_STATUS_CORRUPTED, g_winapiApiTable->GetLastError()); |
| 39 | return; |
| 40 | } |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | void CNM_App::InitScreenProtection(HWND hWnd) |
| 45 | { |
nothing calls this directly
no test coverage detected