MCPcopy Create free account
hub / github.com/FastFlowLM/FastFlowLM / get_driver_version

Function get_driver_version

src/src/main.cpp:168–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166
167#ifdef _WIN32
168std::string get_driver_version(const std::string& device_name) {
169 std::string driver_version;
170 wmi::WMIConnection wmi;
171 if (!wmi.is_valid()) {
172 return "";
173 }
174
175 std::wstring query = L"SELECT * FROM Win32_PnPSignedDriver WHERE DeviceName LIKE '%" +
176 wmi::string_to_wstring(device_name) + L"%'";
177
178 wmi.query(query, [&driver_version](IWbemClassObject* pObj) {
179 if (driver_version.empty()) { // Only get first match
180 driver_version = wmi::get_property_string(pObj, L"DriverVersion");
181 }
182 });
183
184 return driver_version;
185}
186
187std::string identify_npu_arch() {
188 wmi::WMIConnection wmi_conn;

Callers 1

sanity_check_npu_stackFunction · 0.85

Calls 5

string_to_wstringFunction · 0.85
get_property_stringFunction · 0.85
is_validMethod · 0.80
queryMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected