INtime SDK Help
SetRtFilePointer
INtime SDK v6 > About INtime > INtime Kernel > Files > SetRtFilePointer

Moves the file pointer of the indicated file.

BOOLEAN SetRtFilePointer(
RTHANDLE hFile,
int64_t qiDistanceToMove,
LPQWORD lpqwNewFilePointer,
DWORD dwMoveMethod);

Parameters

hFile
A handle to a file object
qiDistanceToMove
A signed number indicating the distance that the file point should be moved. A negative value indicates a reverse move.
lpqwNewFilePointer
A pointer to a location to receive the value of the new file pointer. dwMoveMethod The starting point for the file move. One of the following values should be specified:
FILE_BEGIN The starting point is zero, or the beginning of the file. In this case the qiDistanceToMove value is interpreted as an unsigned quantity.
FILE_CURRENT The start point is the current pointer value.
FILE_END The starting point is the current end-of-file location.

Remarks

Note that it is not an error to set the file pointer to a position beyond the end of the file. The size of the file does not increase until you call the SetEndOfRtFile or WriteRtFile function. A write operation increases the size of the file to the file pointer position plus the size of the buffer written, leaving the intervening bytes uninitialized. You can also use SetRtFilePointer to query the current file pointer position. To do this, specify a move method of FILE_CURRENT and a distance of zero.

Requirements

Versions Defined in Include Link to
INtime 6.0 intime/rt/include/rtbase.h rt.h rt.lib

See Also