Home |
Function RTFRead |
Function RTFReadRTFRead reads data from a file: int RTFRead(RTFHANDLE File, void * DataPtr, UINT Length, UINT * Read); ParametersFileReferences the open file from which to read. DataPtrSpecifies the address for the data to be read. LengthSpecifies the number of bytes to read. ReadPointer to an unsigned integer to receive the number of bytes actually read. Usually, *Read will contain Length after the call. However, in case of an error or if the end of file is encountered during the read, the value may be less. Read 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. Reading past the end of file is not regarded as an error. If RTFRead returns RTF_NO_ERROR, but *Read is less than Length, the end of file has been encountered. This function advances the file's file pointer by the amount given in *Read. In case of an error and if parameter Read is NULL, the new file pointer is undefined.
|