BinaryStream.Close

From Real Software Documentation

Jump to: navigation, search
Method
BinaryStream.Close ( )

Closes the stream (and hence the file opened by the stream).

Example

This example backs a BinarySream with a MemoryBlock that is declared 0-sized:

Dim mb as New MemoryBlock(0)
Dim bs as New BinaryStream(mb)
bs.WriteLong(4)
bs.WriteDouble(3.14)
bs.Close
MsgBox Str(mb.Long (0))

Note that Close was called after the write. It is critical that you call Close after the back or the size of the MemoryBlock is likely to be wrong.

See Also

MemoryBlock

Personal tools