\ * * * DMIInfo (Windows) * * * * Implementing way to read motherboard vendor and name based on * * the win32_baseboar
| 23 | * * |
| 24 | \******************************************************************************************/ |
| 25 | DMIInfo::DMIInfo() |
| 26 | { |
| 27 | mainboard = ""; |
| 28 | manufacturer = ""; |
| 29 | HRESULT hres; |
| 30 | Wmi wmi; |
| 31 | |
| 32 | // Query WMI for Win32_PnPSignedDriver entries with names matching "SMBUS" or "SM BUS" |
| 33 | // These devices may be browsed under Device Manager -> System Devices |
| 34 | std::vector<QueryObj> q_res_BaseBoard; |
| 35 | hres = wmi.query("SELECT * FROM Win32_BaseBoard", q_res_BaseBoard); |
| 36 | |
| 37 | if (hres) |
| 38 | { |
| 39 | LOG_DEBUG("[DMI Info] Unable to read from %s", WMI); |
| 40 | return; |
| 41 | } |
| 42 | |
| 43 | for (QueryObj &i : q_res_BaseBoard) |
| 44 | { |
| 45 | manufacturer = i["Manufacturer"].c_str(); |
| 46 | mainboard = i["Product"].c_str(); |
| 47 | } |
| 48 | } |
| 49 | #else /* WIN32 */ |
| 50 | |
| 51 |