/// <summary> /// Instantiate a new SummaryInformation class from a database file. /// </summary> /// <param name="databaseFile">The database file.</param> public SummaryInformation(string databaseFile) { if (null == databaseFile) { throw new ArgumentNullException(nameof(databaseFile)); } uint handle = 0; var error = MsiInterop.MsiGetSummaryInformation(0, databaseFile, 0, ref handle); if (0 != error) { throw new MsiException(error); } this.Handle = handle; }
/// <summary> /// Instantiate a new SummaryInformation class from an open database. /// </summary> /// <param name="db">Database to retrieve summary information from.</param> public SummaryInformation(Database db) { if (null == db) { throw new ArgumentNullException(nameof(db)); } uint handle = 0; var error = MsiInterop.MsiGetSummaryInformation(db.Handle, null, 0, ref handle); if (0 != error) { throw new MsiException(error); } this.Handle = handle; }