hi ,

i have simple App that uses QAxObject
and according to msdn :
https://msdn.microsoft.com/en-us/lib...=vs.85%29.aspx

it have property SMBIOSBIOSVersion

but i don't know how to access this property in qt without any external libs
it just return QVariant(Invalid)

untitled.pro
Qt Code:
  1. #-------------------------------------------------
  2. #
  3. # Project created by QtCreator 2015-02-17T09:27:36
  4. #
  5. #-------------------------------------------------
  6.  
  7. QT -= core
  8.  
  9. QT += gui
  10.  
  11. TARGET = untitled
  12. CONFIG += console
  13.  
  14. QT += widgets axcontainer
  15.  
  16. CONFIG -= app_bundle
  17.  
  18. TEMPLATE = app
  19.  
  20.  
  21. SOURCES += main.cpp
To copy to clipboard, switch view to plain text mode 

main.cpp
Qt Code:
  1. #include <QApplication>
  2. #include <QDebug>
  3. #include <QMessageBox>
  4. #include <QList>
  5. #include <QByteArray>
  6. #include <QVariant>
  7. #include <ActiveQt/QAxBase>
  8. #include <ActiveQt/QAxObject>
  9.  
  10. int main(int argc, char *argv[])
  11. {
  12. QApplication a(argc, argv);
  13.  
  14. QAxObject *objIWbemLocator = new QAxObject("WbemScripting.SWbemLocator");
  15. QAxObject *objWMIService = objIWbemLocator->querySubObject("ConnectServer(.,root\\cimv2)");
  16. QAxObject *objStartup = objWMIService->querySubObject("ExecQuery(Select * from Win32_BIOS)");
  17.  
  18. qDebug() << "SMBIOSBIOSVersion: " << objStartup->property("SMBIOSBIOSVersion");
  19. qDebug()<<"Hello World";
  20.  
  21. return a.exec();
  22. }
To copy to clipboard, switch view to plain text mode 

win xp sp3
vs 2010 sp1
qt 5.4.0