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;
BSTR bstrNamespace = SysAllocString(L"ROOT\\CIMV2");
hres = pLoc->ConnectServer(
_bstr_t(L"ROOT\\CIMV2"),
NULL, NULL, 0, NULL, 0, 0, &pSvc
bstrNamespace,
NULL, NULL, NULL, 0, NULL, 0, &pSvc
);
SysFreeString(bstrNamespace);
if (FAILED(hres)) {
pLoc->Release();
CoUninitialize();