wintun: enumerate faster by using COMPATDRIVER instead of CLASSDRIVER

This commit is contained in:
Jason A. Donenfeld 2019-05-10 20:30:59 +02:00
parent a6045ac042
commit 7a8553aef0

View File

@ -217,7 +217,7 @@ func CreateInterface(description string, hwndParent uintptr) (*Wintun, bool, err
} }
// Search for the driver. // Search for the driver.
const driverType = setupapi.SPDIT_CLASSDRIVER const driverType = setupapi.SPDIT_COMPATDRIVER
err = devInfoList.BuildDriverInfoList(deviceData, driverType) //TODO: This takes ~510ms err = devInfoList.BuildDriverInfoList(deviceData, driverType) //TODO: This takes ~510ms
if err != nil { if err != nil {
return nil, false, fmt.Errorf("SetupDiBuildDriverInfoList failed: %v", err) return nil, false, fmt.Errorf("SetupDiBuildDriverInfoList failed: %v", err)