mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-27 03:41:22 +08:00
update DeviceDetailsHelper.cpp
This commit is contained in:
parent
abe928d87c
commit
076a138925
@ -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();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user