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

Method InitScreenProtection

Source/Client/NM_Engine/ScreenProtection.cpp:44–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void CNM_App::InitScreenProtection(HWND hWnd)
45{
46 if (!hWnd || !g_winapiApiTable->IsWindow(hWnd))
47 {
48 DEBUG_LOG(LL_ERR, "Target window: %p is NOT valid!", hWnd);
49 return;
50 }
51
52 char szClass[MAX_PATH] = { 0x0 };
53 g_winapiApiTable->GetClassNameA(hWnd, szClass, MAX_PATH);
54
55 char szTitle[MAX_PATH] = { 0x0 };
56 g_winapiApiTable->GetWindowTextA(hWnd, szTitle, MAX_PATH);
57
58 DEBUG_LOG(LL_SYS, "Target window found! %p | %s-%s", hWnd, szTitle, szClass);
59
60 ActivateScreenProtection(hWnd, true);
61}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected