Greetings to Everybody:
I want to use WMI Classes in QT/2009.05 C++ but I do not know how to, I am using QT seperately mean without Eclipse, VS or anything...
I want to create a System Restore point using QT/C++ but not able to do it...in VB it is simple two line like
Qt Code:
  1. Set SRP = GetObject( "winmgmts:\\.\root\default:Systemrestore" )
  2. CSRP = SRP.CreateRestorePoint( "Hacked the registry", 0, 100 )
To copy to clipboard, switch view to plain text mode 

but when I use in QT like
Qt Code:
  1. #include <comdef.h>
  2. #include <Wbemidl.h>
  3. #define _WIN32_DCOM
  4. #include <iostream>
  5. using namespace std;
  6. #include <comdef.h>
  7. #include <Wbemidl.h>
  8.  
  9.  
  10. # pragma comment(lib, "wbemuuid.lib")
  11.  
  12.  
  13. int main(int argc, char **argv)
  14. {
  15. HRESULT hres;
  16.  
  17.  
  18. // Step 1: --------------------------------------------------
  19. // Initialize COM. ------------------------------------------
  20.  
  21.  
  22. hres = CoInitializeEx(0, COINIT_MULTITHREADED);
  23. if (FAILED(hres)) .........
To copy to clipboard, switch view to plain text mode 
then it gives errors like
Wbemidl.h no such file or directory...
comdef.h no such file or directory...
CoIntialize is not declared in this context...

Please help me, how can I use WMI classes in QT/2009.05/C++ . Also let me know if I have to add some libraries or something...
Any help would be appreciated.
Many thanks in advance