Core/CrashHandler: Add a timeout to retrieving windows version from WMI

This commit is contained in:
Shauren
2023-11-19 21:22:09 +01:00
parent 54d969713b
commit 36a6488405

View File

@@ -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))