Sets the file pointer of a file handle to a specified position.
A handle to the file.
The position in bytes from the beginning of the file to which the file pointer should be set.
Specifies whether the file pointer is set in the file or in the process's address space.
If the function succeeds, it returns a handle to the file. If the function fails, it returns 0.
HANDLE hFile;
LONG position = 1024;
DWORD flags = 0;
hFile = SetFilePointerEx(hFile, position, &flags, NULL);
if (hFile == INVALID_HANDLE_VALUE) {
// Handle error
}