|
GetPosition
|
|
|
The GetPosition method returns current file position.
C++
long GetPosition(void);
BASIC
GetPosition() As Long
Parameters
Method has no parameters.
Return Values
The return value is a position in file for reading or writing data at; file position is specified as byte offset from beginning of the file.
If the method fails, the return value is failure code and error code is set.
Call GetError to get error code.
Remarks
File position returned by the method does not specify physical position of the file pointer; it specifies file position for accessing data with IXFile methods.
Actual physical position of the file pointer can be retrieved with Windows SetFilePointer function, passing file handle obtained with
GetFile method as a parameter.
When file is opened with Open or OpenAdvanced method, it is positioned at the beginning of the file (0).
When file is attached to the object with Attach method, its position remains unchanged.
See Also
SetPosition,
Skip,
Positioning File