public static bool DriverInstallInf(string driverPackageInfPath, DIIRFLAG flag, ref bool rebootRequired) { try { return(DiInstallDriver(IntPtr.Zero, driverPackageInfPath, flag, ref rebootRequired)); } catch (Exception ex) { Debug.WriteLine("Failed to install inf driver: " + ex.Message); return(false); } }
public static extern bool DiUninstallDriver(IntPtr hWndParent, string DriverPackageInfPath, DIIRFLAG Flags, ref bool RebootRequired);
public static extern bool DiInstallDriver( IntPtr hwndParent, string FullInfPath, DIIRFLAG Flags, // either ZERO or FORCE_INF out bool NeedReboot );