aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-11-19 21:22:09 +0100
committerfunjoker <funjoker109@gmail.com>2023-12-01 23:28:35 +0100
commit21b75530a6113f11d0e979669f5fc654f602966d (patch)
treecf34f843a6b835b6ed799fb7d86585eebc8b725f
parent33fcde6383d9325fae4eed10162829234d113c8d (diff)
Core/CrashHandler: Add a timeout to retrieving windows version from WMI
(cherry picked from commit 36a64884054f0bf34e815b62157be61c3476127a)
-rw-r--r--src/common/Debugging/WheatyExceptionReport.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/common/Debugging/WheatyExceptionReport.cpp b/src/common/Debugging/WheatyExceptionReport.cpp
index 852e38a2383..bab98e72e3b 100644
--- a/src/common/Debugging/WheatyExceptionReport.cpp
+++ b/src/common/Debugging/WheatyExceptionReport.cpp
@@ -468,14 +468,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))