RAD Studio VCL Reference
TOleStream.Seek Method

Resets the current position of the stream.

function Seek(Offset: Longint; Origin: Word): Longint; override;
virtual __fastcall Longint Seek(Longint Offset, Word Origin);

Use Seek to move the current position by the indicated offset. Seek uses the stream interface to change the current position to the value indicated by the Offset and Origin parameters. 

The Origin parameter indicates how to interpret the Offset parameter. Origin should be one of the following values:

Offset is from the beginning of the Ole stream. Seek moves to the position Offset. Offset must be >= 0.  
Offset is from the current position in the Ole stream. Seek moves to Position + Offset.  
Offset is from the end of the Ole stream. Offset must be <= 0 to indicate a number of bytes before the end of the stream.  

Seek returns the new value of the Position property. 


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!