Expand Minimize

MsiGetPatchFileList function

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 WINAPI MsiGetPatchFileList(
  _In_     LPCTSTR szProductCode,
  _In_     LPCTSTR szPatchList,
  _Inout_  LPDWORD pcFiles,
  _Inout_  MSIHANDLE **    pphFileRecords
);

Parameters

szProductCode [in]

A null-terminated string value containing the ProductCode (GUID) of the product which is the target of the patches. This parameter cannot be NULL.

szPatchList [in]

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.

pcFiles [in, out]

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.

pphFileRecords [in, out]

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.

ValueMeaning
ERROR_SUCCESS

The function completed successfully.

ERROR_INVALID_PARAMETER

An invalid parameter was passed to the function.

ERROR_FUNCTION_FAILED

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.

Requirements

Version

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.

Header

Msi.h

Library

Msi.lib

DLL

Msi.dll

Unicode and ANSI names

MsiGetPatchFileListW (Unicode) and MsiGetPatchFileListA (ANSI)

See also

Not Supported in Windows Installer 3.1 and earlier versions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft