MsiRecordReadStream

[This is preliminary documentation and subject to change.]

The MsiRecordReadStream function reads bytes from a record stream field into a buffer.

UINT MsiRecordReadStream(
  MSIHANDLE hRecord,    // record handle
  unsigned int iField,  // field of record
  char *szDataBuf,      // buffer to receive bytes from stream
  DWORD *pchDataBuf     // in/out buffer count
);
 

Parameters

hRecord
Handle to the record.
iField
Specifies the field of the record.
szDataBuf
Specifies the buffer to hold data.
pchDataBuf
Specifies the in/out buffer count.

Return Values

ERROR_INVALID_DATATYPE
The field is not a stream column.
ERROR_INVALID_HANDLE
An invalid or inactive handle was supplied.
ERROR_INVALID_PARAMETER
An invalid parameter was passed to the function.
ERROR_SUCCESS
The function succeeded.

Remarks

When using the MsiRecordReadStream function, you must set the pchDataBuf parameter to the requested byte count to read. The number of bytes transferred is returned through the pchDataBuf parameter. If no more bytes are available, ERROR_SUCCESS is still returned.

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.

See Also

Database Access Reference, Record Processing Functions