update DeviceDetailsHelper.cpp

This commit is contained in:
0-Kutya-0 2025-09-20 22:11:20 +03:00
parent abe928d87c
commit 076a138925

View File

@ -68,10 +68,12 @@ static QString queryWmiProperty(const QString& wmiClass, const QString& property
} }
IWbemServices* pSvc = NULL; IWbemServices* pSvc = NULL;
BSTR bstrNamespace = SysAllocString(L"ROOT\\CIMV2");
hres = pLoc->ConnectServer( hres = pLoc->ConnectServer(
_bstr_t(L"ROOT\\CIMV2"), bstrNamespace,
NULL, NULL, 0, NULL, 0, 0, &pSvc NULL, NULL, NULL, 0, NULL, 0, &pSvc
); );
SysFreeString(bstrNamespace);
if (FAILED(hres)) { if (FAILED(hres)) {
pLoc->Release(); pLoc->Release();
CoUninitialize(); CoUninitialize();