aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-11-19 21:22:09 +0100
committerShauren <shauren.trinity@gmail.com>2023-11-19 21:22:09 +0100
commit36a64884054f0bf34e815b62157be61c3476127a (patch)
treec607dde056ad4c834d5ceded79034bd0e75da615 /src/common
parent54d969713b14057204cfe4a57f8db2d399939d2b (diff)
Core/CrashHandler: Add a timeout to retrieving windows version from WMI
Diffstat (limited to 'src/common')
-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))