Export (0) Print
Expand All
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

MsiGetPatchInfo function

The MsiGetPatchInfo function returns information about a patch.

Syntax


UINT MsiGetPatchInfo(
  _In_     LPCTSTR szPatch,
  _In_     LPCTSTR szAttribute,
  _Out_    LPTSTR lpValueBuf,
  _Inout_  DWORD *pcchValueBuf
);

Parameters

szPatch [in]

Specifies the patch code for the patch package.

szAttribute [in]

Specifies the attribute to be retrieved.

AttributeMeaning
INSTALLPROPERTY_LOCALPACKAGE

Local cached package.

 

lpValueBuf [out]

Pointer to a buffer that receives the property value. This parameter can be null.

pcchValueBuf [in, out]

Pointer to a variable that specifies the size, in characters, of the buffer pointed to by the lpValueBuf parameter. On input, this is the full size of the buffer, including a space for a terminating null character. If the buffer passed in is too small, the count returned does not include the terminating null character.

If lpValueBuf is null, pcchValueBuf can be null.

Return value

The MsiGetPatchInfo function returns the following values.

ValueMeaning
ERROR_BAD_CONFIGURATION

The configuration data is corrupt.

ERROR_INVALID_PARAMETER

An invalid parameter was passed to the function.

ERROR_MORE_DATA

A buffer is too small to hold the requested data.

ERROR_SUCCESS

The function completed successfully.

ERROR_UNKNOWN_PRODUCT

The patch package is not installed.

ERROR_UNKNOWN_PROPERTY

The property is unrecognized.

 

Remarks

When the MsiGetPatchInfo function returns, the pcchValueBuf parameter contains the length of the class string stored in the buffer. The count returned does not include the terminating null character.

If the buffer is too small to hold the requested data, MsiGetPatchInfo returns ERROR_MORE_DATA, and pcchValueBuf contains the number of characters copied to lpValueBuf, without counting the null character.

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 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.

Header

Msi.h

Library

Msi.lib

DLL

Msi.dll

Unicode and ANSI names

MsiGetPatchInfoW (Unicode) and MsiGetPatchInfoA (ANSI)

See also

Not Supported in Windows Installer 2.0 and earlier

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.