// this include list of the devices from all the INFs in the directory public PNPDriverDirectory(string path) { _path = path; var fileNames = GetINFFileNamesInDirectory(path); _infList = new List <PNPDriverINFFile>(); foreach (var fileName in fileNames) { var driverInf = new PNPDriverINFFile(fileName); driverInf.ReadFromDirectory(path); _infList.Add(driverInf); } }
public string GetDeviceInstallSectionName(string hardwareIDToFind, string architectureIdentifier, int minorOSVersion, int productType, out PNPDriverINFFile pnpDriverInf) { foreach (var driverInf in _infList) { var installSectionName = driverInf.GetDeviceInstallSectionName(hardwareIDToFind, architectureIdentifier, minorOSVersion, productType); if (installSectionName != string.Empty) { pnpDriverInf = driverInf; return(installSectionName); } } pnpDriverInf = null; return(string.Empty); }