MsiRecordSetStream

[This is preliminary documentation and subject to change.]

The MsiRecordSetStream function sets a record stream field from a file.

UINT MsiRecordSetStream(
  MSIHANDLE hRecord,      // record handle
  unsigned int iField,    // field of record
  LPCTSTR szFilePath      // path to file containing stream
);
 

Parameters

hRecord
Handle to the record.
iField
Specifies the field of the record to set.
szFilePath
Specifies the path to the file containing the stream.

Return Values

ERROR_BAD_PATHNAME
An invalid path was supplied.
ERROR_FUNCTION_FAILED
The function failed.
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

The contents of the file specified in the MsiRecordSetStream function is read into a stream object. The stream persists if the record is inserted into the database and the database is committed.

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