From 8b73bb509e631ae1d8c1009479aaf8cf82db5236 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 19 Nov 2023 21:22:09 +0100 Subject: [PATCH] Core/CrashHandler: Add a timeout to retrieving windows version from WMI (cherry picked from commit 36a64884054f0bf34e815b62157be61c3476127a) --- src/common/Debugging/WheatyExceptionReport.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/common/Debugging/WheatyExceptionReport.cpp b/src/common/Debugging/WheatyExceptionReport.cpp index 52bfe739a2d..e0b0bd105de 100644 --- a/src/common/Debugging/WheatyExceptionReport.cpp +++ b/src/common/Debugging/WheatyExceptionReport.cpp @@ -459,14 +459,14 @@ BOOL WheatyExceptionReport::_GetWindowsVersionFromWMI(TCHAR* szVersion, DWORD cn { IWbemServices* tmp = nullptr; HRESULT hres = loc->ConnectServer( - bstr_t(L"ROOT\\CIMV2"), // Object path of WMI namespace - nullptr, // User name. NULL = current user - nullptr, // User password. NULL = current - nullptr, // Locale. NULL indicates current - 0, // Security flags. - nullptr, // Authority (for example, Kerberos) - nullptr, // Context object - &tmp // pointer to IWbemServices proxy + bstr_t(L"ROOT\\CIMV2"), // Object path of WMI namespace + nullptr, // User name. NULL = current user + nullptr, // User password. NULL = current + nullptr, // Locale. NULL indicates current + WBEM_FLAG_CONNECT_USE_MAX_WAIT, // Security flags. + nullptr, // Authority (for example, Kerberos) + nullptr, // Context object + &tmp // pointer to IWbemServices proxy ); if (FAILED(hres))