diff --git a/src/Magpie.App/ScalingService.cpp b/src/Magpie.App/ScalingService.cpp index 559017d5..671747d1 100644 --- a/src/Magpie.App/ScalingService.cpp +++ b/src/Magpie.App/ScalingService.cpp @@ -332,6 +332,7 @@ void ScalingService::_ScaleForegroundWindow() { static bool GetWindowIntegrityLevel(HWND hWnd, DWORD& integrityLevel) noexcept { wil::unique_process_handle hProc = Win32Utils::GetWndProcessHandle(hWnd); if (!hProc) { + Logger::Get().Error("GetWndProcessHandle 失败"); return false; } diff --git a/src/Shared/Win32Utils.cpp b/src/Shared/Win32Utils.cpp index 16c4ddb5..f184b48c 100644 --- a/src/Shared/Win32Utils.cpp +++ b/src/Shared/Win32Utils.cpp @@ -64,8 +64,9 @@ wil::unique_process_handle Win32Utils::GetWndProcessHandle(HWND hWnd) noexcept { } std::wstring Win32Utils::GetPathOfWnd(HWND hWnd) noexcept { - wil::unique_process_handle hProc = Win32Utils::GetWndProcessHandle(hWnd); + wil::unique_process_handle hProc = GetWndProcessHandle(hWnd); if (!hProc) { + Logger::Get().Error("GetWndProcessHandle 失败"); return {}; }