我对 Windows 编程很陌生。这是我的代码
objIWbemLocator = new QAxObject("WbemScripting.SWbemLocator");
objWMIService = objIWbemLocator->querySubObject("ConnectServer(QString&,QString&)",QString("."),QString("root\\cimv2"));
QAxObject* returnList = objWMIService->querySubObject("ExecQuery(QString&)", QString("select * from %1").arg(domain));
QAxObject* result = returnList->querySubObject("ItemIndex(int)", 0);
我在运行时收到错误
Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in
但是ItemIndex
方法存在