MsiCreateTransformSummaryInfoA function

The MsiCreateTransformSummaryInfo function creates summary information of an existing transform to include validation and error conditions. Execution of this function sets the error record, which is accessible by using MsiGetLastErrorRecord.

Syntax

UINT MsiCreateTransformSummaryInfoA(
  MSIHANDLE hDatabase,
  MSIHANDLE hDatabaseReference,
  LPCSTR    szTransformFile,
  int       iErrorConditions,
  int       iValidation
);

Parameters

hDatabase

The handle to the database that contains the new database summary information.

hDatabaseReference

The handle to the database that contains the original summary information.

szTransformFile

The name of the transform to which the summary information is added.

iErrorConditions

The error conditions that should be suppressed when the transform is applied. Use one or more of the following values.

Error condition Meaning
none
0x00000000
None of the following conditions.
MSITRANSFORM_ERROR_ADDEXISTINGROW
0x00000001
Adding a row that exists.
MSITRANSFORM_ERROR_DELMISSINGROW
0x00000002
Deleting a row that does not exist.
MSITRANSFORM_ERROR_ADDEXISTINGTABLE
0x00000004
Adding a table that exists.
MSITRANSFORM_ERROR_DELMISSINGTABLE
0x00000008
Deleting a table that does not exist.
MSITRANSFORM_ERROR_UPDATEMISSINGROW
0x00000010
Updating a row that does not exist.
MSITRANSFORM_ERROR_CHANGECODEPAGE
0x00000020
Transform and database code pages do not match, and their code pages are neutral.

iValidation

Specifies the properties to be validated to verify that the transform can be applied to the database. This parameter can be one or more of the following values.

Validation flag Meaning
none
0x00000000
Do not validate properties.
MSITRANSFORM_VALIDATE_LANGUAGE
0x00000001
Default language must match base database.
MSITRANSFORM_VALIDATE_PRODUCT
0x00000002
Product must match base database.
 

Validate product version flags.

Validation flag Meaning
MSITRANSFORM_VALIDATE_MAJORVERSION
0x00000008
Check major version only.
MSITRANSFORM_VALIDATE_MINORVERSION
0x00000010
Check major and minor versions only.
MSITRANSFORM_VALIDATE_UPDATEVERSION
0x00000020
Check major, minor, and update versions.
 

Product version relationship flags. In the following table the installed version is the version of the package that is being transformed, and the base version is the version of the package that is used to create the transform.

Validation flag Meaning
MSITRANSFORM_VALIDATE_NEWLESSBASEVERSION
0x00000040
Installed version < base version.
MSITRANSFORM_VALIDATE_NEWLESSEQUALBASEVERSION
0x00000080
Installed version <= base version.
MSITRANSFORM_VALIDATE_NEWEQUALBASEVERSION
0x00000100
Installed version = base version.
MSITRANSFORM_VALIDATE_NEWGREATEREQUALBASEVERSION
0x00000200
Installed version >= base version.
MSITRANSFORM_VALIDATE_NEWGREATERBASEVERSION
0x00000400
Installed version > base version.
 

Upgrade code validation flags.

Validation flag Meaning
MSITRANSFORM_VALIDATE_UPGRADECODE
0x00000800
UpgradeCode must match base database.

Return Value

This function returns UINT.

Remarks

The ProductCode Property and ProductVersion Property must be defined in the Property Table of both the base and reference databases. If MSITRANSFORM_VALIDATE_UPGRADECODE is used, the UpgradeCode Property must also be defined in both databases. If these conditions are not met, MsiCreateTransformSummaryInfo returns ERROR_INSTALL_PACKAGE_INVALID.

  • Do not use the semicolon for filenames or paths, because it is used as a list delimiter for transforms, sources, and patches.
  • This function cannot be called from custom actions. A call to this function from a custom action causes the function to fail.

Requirements

   
Minimum supported client Windows Installer 5.0 on Windows Server 2012, Windows 8, Windows Server 2008 R2 or Windows 7. Windows Installer 4.0 or Windows Installer 4.5 on Windows Server 2008 or Windows Vista. Windows Installer on Windows Server 2003 or Windows XP
Target Platform Windows
Header msiquery.h
Library Msi.lib
DLL Msi.dll

See Also

Database Transforms

Summary Information Stream Property Set