MsiGetPatchFileListA function (msi.h)
The MsiGetPatchFileList function is provided a list of .msp files, delimited by semicolons, and retrieves the list of files that can be updated by the patches.
Syntax
UINT MsiGetPatchFileListA(
[in] LPCSTR szProductCode,
[in] LPCSTR szPatchPackages,
[in, out] LPDWORD pcFiles,
[in, out] MSIHANDLE **pphFileRecords
);
Parameters
[in] szProductCode
A null-terminated string value containing the ProductCode (GUID) of the product which is the target of the patches. This parameter cannot be NULL.
[in] szPatchPackages
A null-terminated string value that contains the list of Windows Installer patches (.msp files). Each patch can be specified by the full path to the patch package. The patches in the list are delimited by semicolons. At least one patch must be specified.
[in, out] pcFiles
A pointer to a location that receives the number of files that will be updated on this system by this list of patches specified by szPatchList. This parameter is required.
[in, out] pphFileRecords
A pointer to a location that receives a pointer to an array of records. The first field (0-index) of each record contains the full file path of a file that can be updated when the list of patches in szPatchList are applied on this computer. This parameter is required.
Return value
The MsiGetPatchFileList function returns the following values.
Value | Meaning |
---|---|
|
The function completed successfully. |
|
An invalid parameter was passed to the function. |
|
The function failed. |
Remarks
For example, szPatchList could have the value: "c:\sus\download\cache\Office\sp1.msp; c:\sus\download\cache\Office\QFE1.msp; c:\sus\download\cache\Office\QFEn.msp".
This function runs in the context of the caller. The product code is searched in the order of user-unmanaged context, user-managed context, and machine context.
You must close all MSIHANDLE objects that are returned by this function by calling the MsiCloseHandle function.
If the function fails, you can obtain extended error information by using the MsiGetLastErrorRecord function.
For more information about using the MsiGetPatchFileList function see Listing the Files that can be Updated.
Note
The msi.h header defines MsiGetPatchFileList as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
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 4.5 on Windows Server 2003 and Windows XP. See the Windows Installer Run-Time Requirements for information about the minimum Windows service pack that is required by a Windows Installer version. |
Target Platform | Windows |
Header | msi.h |
Library | Msi.lib |
DLL | Msi.dll |