MCPcopy Create free account
hub / github.com/NoMercy-ac/NoMercy / CheckScreenProtection

Method CheckScreenProtection

Source/Client/NM_Engine/ScreenProtection.cpp:22–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22void 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
44void CNM_App::InitScreenProtection(HWND hWnd)
45{

Callers

nothing calls this directly

Calls 1

OnCloseRequestMethod · 0.80

Tested by

no test coverage detected