| 42 | } |
| 43 | |
| 44 | void 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected