Storages & Files GetSize and SetSize
GetSize/SetSize method

Returns/Sets the size of the stream in buffer lengths (i.e. how many buffers can be filled sequentially from the beginning to the end of the stream). The StreamBegin value is subtracted from the size of the stream before calculating/setting its size.

Syntax:

variable = object.GetSize(stream)
object.SetSize(stream,records)

Parameters:

stream - A SFStream or an object that supports IStream interface.

records - the size in records (buffer lengths).

returned value: The size of the stream in buffer lengths.

Remarks:

When used with SFRecord (see SFRecord.BindTo method) the size of the buffer is calculated automatically and the size of the stream size is then calculated as the number of records in it. Developers interested in low level operations can use this method to implement advanced techniques. 

When setting the stream size and the new size is bigger than the current stream size the newly allocated space is initialized with undefined values. When the new size is lower than the current the records beyond the new stream end are lost.

Applies to: SFFilter object

Supported on:

Windows 95/NT and later
Windows CE 3.0 and later
Pocket PC/Windows Mobile 2003 and later
Windows CE.NET 4 and later

 

newObjects Copyright 2001-2006 newObjects [ ]