|
SetPosition
|
|
|
The SetPosition method sets current file position.
C++
long SetPosition(
long FilePosition // file position
);
BASIC
SetPosition(
FilePosition As Long // file position
) As Long
Parameters
- FilePosition
- File position specified as byte offset from beginning of the file.
If this parameter is -1 file is positioned at the end of file position.
Return Values
If the method succeeds, the return value is 0.
If the method fails, the return value is failure code and error code is set.
Call GetError to get error code.
Remarks
FilePosition specifies position in file for accessing data with IXFile methods. Physical position of the file pointer remains unchanged until actual data access occurs.
Unsaved data present in internal buffer is flushed to the file prior to changing its position.
Position of the file set with the method can be located anywhere in the file or at the end of file (one byte beyond last byte in file);
file cannot be positioned beyond end of file.
See Also
GetPosition,
Skip,
Positioning File