Skip to content

purpl3F0x/wmi_pp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple WMI wrapper for c++

Use:

  HRESULT hres;
  Wmi wmi;
  wmi.init();

  std::vector<QueryObj> q_res;
  hres = wmi.query("SELECT * FROM Win32_PnPAllocatedResource '\%'", q_res);
  
  if (hres){
    std::cout << "query error:\t" << hres << std::endl;
    return 0;
  }

  std::cout << q_res.size() << "\n";

  for (auto &i: q_res){
    std::cout << i["DeviceID"];
  }

Stavros Avramidis

Never Settle and keep Running

Releases

No releases published

Packages

No packages published