/// <summary> /// Applies a transform to this database. /// </summary> /// <param name="transformFile">Path to the transform file being applied.</param> /// <param name="errorConditions">Specifies the error conditions that are to be suppressed.</param> public void ApplyTransform(string transformFile, TransformErrorConditions errorConditions) { int error = MsiInterop.MsiDatabaseApplyTransform(this.Handle, transformFile, errorConditions); if (0 != error) { throw new MsiException(error); } }
/// <summary> /// Creates and populates the summary information stream of an existing transform file. /// </summary> /// <param name="referenceDatabase">Required database that does not include the changes.</param> /// <param name="transformFile">The name of the generated transform file.</param> /// <param name="errorConditions">Required error conditions that should be suppressed when the transform is applied.</param> /// <param name="validations">Required when the transform is applied to a database; /// shows which properties should be validated to verify that this transform can be applied to the database.</param> public void CreateTransformSummaryInfo(Database referenceDatabase, string transformFile, TransformErrorConditions errorConditions, TransformValidations validations) { int error = MsiInterop.MsiCreateTransformSummaryInfo(this.Handle, referenceDatabase.Handle, transformFile, errorConditions, validations); if (0 != error) { throw new MsiException(error); } }
internal static extern int MsiDatabaseApplyTransform(uint database, string transformFile, TransformErrorConditions errorConditions);
internal static extern int MsiCreateTransformSummaryInfo(uint database, uint referenceDatabase, string transformFile, TransformErrorConditions errorConditions, TransformValidations validations);