MsiGetProperty

[This is preliminary documentation and subject to change.]

The MsiGetProperty function gets the value for an installer property.

UINT MsiGetProperty(
  MSIHANDLE hInstall,    // installer handle
  LPCTSTR szName,        // property identifier, case-sensitive
  LPTSTR szValueBuf,     // buffer for returned property value
  DWORD *pchValueBuf     // in/out buffer character count
);
 

Parameters

hInstall
Handle to the installer.
szName
Specifies the name of the property.
szValueBuf
Specifies the buffer for the value of the property.
pchValueBuf
Specifies the in-buffer character count.

Return Values

ERROR_INVALID_HANDLE
An invalid or inactive handle was supplied.
ERROR_INVALID_PARAMETER
An invalid parameter was passed to the function.
ERROR_MORE_DATA
A buffer was too small to hold the entire value.
ERROR_SUCCESS
The function succeeded.

Remarks

If the value for the property retrieved by the MsiGetProperty function is not defined, it is equivalent to a 0-length value. It is not an error.

QuickInfo

  Windows NT: Requires version 4.0 or later. Available as a redistributable for Windows NT 4.0.
  Windows: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in msiquery.h.
  Import Library: Use msi.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows NT.

See Also

Database Access Reference, Installer State Access Functions