Storages & Files buffPos
buffPos read/write property

Returns or sets the current position in the filter's buffer in bytes. When used with SFRecord the position is controlled automatically but in case of direct usage of the filter you may want to control it.

Syntax:

variable = object.buffPos
object.buffPos = position

Examples:

Set filter = Server.CreateObject("newObjects.utilctls.SFFilter")
filter.buffSize = 16 ' 16 bytes will be read/written at once
' let strm is some stream opened before
If filter.Read(strm) Then
  ' We have the next 16 bytes read from the stream.
  ' Now we can use the rest of the filter features over them
  
  ' Read an 4-byte integer from the buffer beginning
  i = filter.GetVar(vbLong)
  ' Go to 10-th byte and do the same
  filter.buffPos = 10
  i = filter.GetVar(vbLong)
  ' etc.
Else
  ' Read error occured
End If

Remarks:

As SFFilter input/output operations always read or write the entire buffer the application may want to navigate through the buffer and read/write different values at different places in it. When used with SFRecord this navigation is done automatically but if the application needs low level usage of the filter it is able to do it directly. Why and when this will be needed? For example when reading non record-like structures from a file (such as headers) - you may know the size of the data but actual content may depend on the values in it - e.g. you may need to read some values in order to determine what the next values are.

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 [ ]