continue
}
+ // Check the Hardware ID to make sure it's a real Wintun device first. This avoids doing slow operations on non-Wintun devices.
+ property, err := devInfoList.DeviceRegistryProperty(deviceData, setupapi.SPDRP_HARDWAREID)
+ if err != nil {
+ continue
+ }
+ if hwids, ok := property.([]string); ok && len(hwids) > 0 && hwids[0] != hardwareID {
+ continue
+ }
+
wintun, err := makeWintun(devInfoList, deviceData, pool)
if err != nil {
continue
continue
}
+ // Check the Hardware ID to make sure it's a real Wintun device first. This avoids doing slow operations on non-Wintun devices.
+ property, err := devInfoList.DeviceRegistryProperty(deviceData, setupapi.SPDRP_HARDWAREID)
+ if err != nil {
+ continue
+ }
+ if hwids, ok := property.([]string); ok && len(hwids) > 0 && hwids[0] != hardwareID {
+ continue
+ }
+
err = devInfoList.BuildDriverInfoList(deviceData, setupapi.SPDIT_COMPATDRIVER)
if err != nil {
continue