Skip to content

Latest commit

 

History

History
190 lines (148 loc) · 6.04 KB

nf-msi-msiextractpatchxmldataa.md

File metadata and controls

190 lines (148 loc) · 6.04 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:msi.MsiExtractPatchXMLDataA
MsiExtractPatchXMLDataA function (msi.h)
The MsiExtractPatchXMLData function extracts information from a patch that can be used to determine if the patch applies to a target system. (ANSI)
MsiExtractPatchXMLDataA
msi/MsiExtractPatchXMLDataA
setup\msiextractpatchxmldata.htm
setup
b0044783-552d-4492-bb1d-337227dd3e16
12/05/2018
MsiExtractPatchXMLData, MsiExtractPatchXMLData function, MsiExtractPatchXMLDataA, MsiExtractPatchXMLDataW, msi/MsiExtractPatchXMLData, msi/MsiExtractPatchXMLDataA, msi/MsiExtractPatchXMLDataW, setup.msiextractpatchxmldata
msi.h
Windows
Windows Installer 4.0 or Windows Installer 4.5 on Windows Server 2008 or Windows Vista. Windows Installer 3.0 or later on Windows Server 2003 or 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.
MsiExtractPatchXMLDataW (Unicode) and MsiExtractPatchXMLDataA (ANSI)
Msi.lib
Msi.dll
Windows
19H1
MsiExtractPatchXMLDataA
msi/MsiExtractPatchXMLDataA
c++
APIRef
kbSyntax
DllExport
Msi.dll
MsiExtractPatchXMLData
MsiExtractPatchXMLDataA
MsiExtractPatchXMLDataW

MsiExtractPatchXMLDataA function

-description

The MsiExtractPatchXMLData function extracts information from a patch that can be used to determine if the patch applies to a target system. The function returns an XML string that can be provided to MsiDeterminePatchSequence and MsiDetermineApplicablePatches instead of the full patch file. The returned information can be used to determine whether the patch is applicable.

-parameters

-param szPatchPath [in]

The full path to the patch that is being queried. Pass in as a null-terminated string. This parameter cannot be NULL.

-param dwReserved [in]

A reserved argument that must be 0 (zero).

-param szXMLData [out, optional]

A pointer to a buffer to hold the XML string that contains the extracted patch information. This buffer should be large enough to contain the received information. If the buffer is too small, the function returns ERROR_MORE_DATA and sets *pcchXMLData to the number of TCHAR in the value, not including the terminating NULL character.

If szXMLData is set to NULL and pcchXMLData is set to a valid pointer, the function returns ERROR_SUCCESS and sets *pcchXMLData to the number of TCHAR in the value, not including the terminating NULL character. The function can then be called again to retrieve the value, with szXMLData buffer large enough to contain *pcchXMLData + 1 characters.

-param pcchXMLData [in, out, optional]

A pointer to a variable that specifies the number of TCHAR in the szXMLData buffer. When the function returns, this parameter is set to the size of the requested value whether or not the function copies the value into the specified buffer. The size is returned as the number of TCHAR in the requested value, not including the terminating null character.

If this parameter is set to NULL, the function returns ERROR_INVALID_PARAMETER.

-returns

The MsiExtractPatchXMLData function can return the following values.

Return code Description
ERROR_FUNCTION_FAILED
The function failed in a way that is not identified by any of the return values in this table.
ERROR_INVALID_PARAMETER
An invalid parameter was passed to the function.
ERROR_MORE_DATA
The value does not fit in the provided buffer.
ERROR_PATCH_OPEN_FAILED
The patch file could not be opened.
ERROR_SUCCESS
The function was successful.
ERROR_PATCH_PACKAGE_INVALID
The patch file could not be opened.
ERROR_CALL_NOT_IMPLEMENTED
This error can be returned if MSXML 3.0 is not installed.

-remarks

The ExtractPatchXMLData method of the Installer object uses the MsiExtractPatchXMLData function.

Note

The msi.h header defines MsiExtractPatchXMLData as an alias which 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 not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

-see-also

MsiDetermineApplicablePatches

MsiDeterminePatchSequence

Not Supported in Windows Installer 2.0 and earlier