MsiRecordGetString

[This is preliminary documentation and subject to change.]

The MsiRecordGetString function returns the string value of a record field.

UINT MsiRecordGetString(
  MSIHANDLE hRecord,     // record handle
  unsigned int iField,   // field requested
  LPTSTR szValueBuf,     // buffer to hold string
  DWORD *pcchValueBuf    // pointer to size of buffer
);
 

Parameters

hRecord
Handle to the record.
iField
Specifies the field requested.
szValueBuf
Specifies a buffer to hold the returned string.
pcchValueBuf
Pointer to the size of the buffer.

Return Values

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

Remarks

If ERROR_MORE_DATA is returned from the MsiRecordGetString function, the pcchValueBuf parameter contains the size of the buffer required to hold the string. If ERROR_SUCCESS is returned, pcchValueBuf contains the number of characters written to the string buffer.

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, Record Processing Functions