Exportar (0) Imprimir
Expandir Tudo
EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

MsiGetProductProperty function

The MsiGetProductProperty function retrieves product properties. These properties are in the product database.

Syntax


UINT MsiGetProductProperty(
  _In_     MSIHANDLE hProduct,
  _In_     LPCTSTR szProperty,
  _Out_    LPTSTR lpValueBuf,
  _Inout_  DWORD *pcchValueBuf
);

Parameters

hProduct [in]

Handle to the product obtained from MsiOpenProduct.

szProperty [in]

Specifies the property to retrieve. This is case-sensitive.

lpValueBuf [out]

Pointer to a buffer that receives the property value. The value is truncated and null-terminated if lpValueBuf is too small. 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 MsiGetProductProperty function return the following values.

ValueMeaning
ERROR_INVALID_PARAMETER

An invalid parameter was passed to the function.

ERROR_INVALID_HANDLE

An invalid handle was passed to the function.

ERROR_MORE_DATA

A buffer is too small to hold the entire property value.

ERROR_SUCCESS

The function completed successfully.

 

Remarks

When the MsiGetProductProperty function returns, the pcchValueBuf parameter contains the length of the string stored in the buffer. The count returned does not include the terminating null character. If the buffer is not big enough, MsiGetProductProperty returns ERROR_MORE_DATA, and MsiGetProductProperty contains the size of the string, in characters, 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

MsiGetProductPropertyW (Unicode) and MsiGetProductPropertyA (ANSI)

See also

Product Query Functions

 

 

Contribuições da comunidade

ADICIONAR
Mostrar:
© 2014 Microsoft