You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nuget package for C# that makes it easy to parse .inf files, to store and work with information about system drivers.
This NuGet Package allows you to parse .inf files and browse them using object model wrappers (using the InfData class). You can browse categories and their keys by handling them as collections or simply using [id] operators. Currently, this package does not support installing drivers from inf files, only parsing and browsing through the file. The feature for creating an INF file will be added in later versions.
//obtain category by idvarversion=data["Version"];//get keys from the categoryvarproviderKey=version["Provider"];varclassGuidKey=version["ClassGuid"];//obtain key directelyvarkey=data["Strings"]["KeyId"];// get list of vaues separated by commavarvalues=key.KeyValues;//get valuevarvalue=values[0].Value;if(value.IsDynamic){//the key value refers to another key}//you can also ignore all wrappers and just get the primitive value (string)varvalue=key.PrimitiveValue;
Custom driver info serialization
publicclassDriverInfo{[InfKeyValue("Version","Class")]publicstringClass{get;set;}[InfKeyValue("Version","Provider")]publicstringProvider{get;set;}}// ....varhelper=newInfUtil();varserilized=helper.SerializeFileInto<DriverInfo>(Path.Combine(testFolder,"oem100.inf" out InfData data);