FTell64 Function | |
Return the current position of the file pointer.
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax FUNCTION FTell64(
pFile AS IntPtr
) AS INT64
public static long FTell64(
IntPtr pFile
)
Request Example
View SourceParameters
- pFile
- Type: IntPtr
Return Value
Type:
Int64
The current position of the file pointer, relative to the beginning of the file.
Remarks
FTell() gets the current file position.
This corresponds to the current physical byte offset for files opened in binary mode.
Examples
This example uses FTell() to reflect the file pointer position before and after an FWrite() and an FSeek():
1hF := FOpen2("myfile.txt", FO_READWRITE)
2IF hF != F_ERROR
3 ? FTell(hF)
4 FWrite3(hF, "Hello", 5)
5 ? FTell(hF)
6 FSeek3(hF, 10, FS_SET)
7 ? FTell(hF)
8ELSE
9 ? "Open failed"
10ENDIF
See Also