Home |
Function RTFWrite |
Function RTFWriteRTFWrite writes data to a file: int RTFWrite(RTFHANDLE File, const void * DataPtr, UINT Length, UINT * Written); ParametersFileReferences the open file to write to. DataPtrSpecifies the address of the data to be written. LengthSpecifies the number of bytes to write. WrittenPointer to an unsigned integer to receive the number of bytes actually written. Usually, *Written will contain Length after the call. However, in case of an error, the returned value may be less. Written may be set to NULL if this information is not required by an application. return valueIf the function succeeds, the return value is RTF_NO_ERROR. If the function fails, the return value is a negative error code. Writing past the current end of file will automatically extend the file. When the file size exceeds the current allocated file size, new clusters are allocated for the file. RTFiles-32 will allocate new clusters immediately following the current last cluster, if possible. This function advances the file's file pointer by the amount given in *Written. In case of an error and if parameter Written is NULL, the new file pointer is undefined.
|