Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 438 Bytes

README.md

File metadata and controls

28 lines (19 loc) · 438 Bytes

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