When an application calls CreateFile to open a file for the first time, Windows places the file pointer at the beginning of the file. As bytes are read from or written to the file, Windows advances the file pointer the number of bytes read or written.
An application can position the file pointer to a specified offset by calling SetFilePointer.
The SetFilePointer function can also be used to query the current file pointer position by specifying a move method of FILE_CURRENT and a distance of zero.
Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
