Home |
Function RTFSeek |
Function RTFSeekRTFSeek repositions a file pointer and possibly extends a file. Unlike RTFSeekEx, this function can move the file pointer at most 231 bytes. long RTFSeek(RTFHANDLE File, long Offset, int Whence); ParametersFileReferences the open file for which to reposition the file pointer. OffsetSpecifies how far the file pointer should be moved. Please note that Offset is a signed long value. WhenceSpecifies Offset's meaning. The following values are allowed:
return valueIf the function succeeds, the return value is the new file pointer value, or, if the file pointer is larger than 231-1, RTF_LONG_FILE_POS is returned. In this case, the actual file pointer can be queried using function RTFGetFileInfoEx. If the function fails, the return value is some other negative error code. Moving the file pointer before the beginning of the file is an error. However, moving it beyond the current file size is supported. In this case, the file is extended. The data between the previous file size and the new file size is undefined. This method to extend a file is much faster than actually writing data to it. An alternate method to extend a file is to use function RTFExtend.
|