ReadStream Method

[This is preliminary documentation and subject to change.]

This is the ReadStream method of the MsiRecord object. This method reads a specified number of bytes from a record field holding stream data.

Syntax

object.ReadStream(field, length, format)

Parts

object
MsiRecord object.
field
Required field number of the value within the record, 1-based.
length
Required number of bytes to read from the stream.
format
Required interpretation and return of the data bytes, one of the following:
isfInteger = 0 As a long integer, length must be 1 to 4.
isfBytes = 1 Raw data as a BSTR; one byte per character.
isfAnsi = 2 ANSI bytes translated to a Unicode BSTR.
isfDirect = 3 Byte pairs returned directly as a BSTR.

Remarks

The returned value of a non-existent field is an Empty value. If the stream has fewer bytes that the count requested, the returned string is shortened appropriately.