FMRead (LabVIEW Manager Function)

MgErr FMRead(fd, inCount, outCountp, buffer);

Purpose

Reads inCount bytes from the file specified by the file descriptor fd. The function starts from the current position mark and reads the data into memory, starting at the address specified by buffer. Use the FMSeek function to set the current position mark and the FMTell function to return the position of the current position mark.

The function stores the actual number of bytes read in *outCountp. The number of bytes can be less than inCount if the function encounters end-of-file before reading inCount bytes. The number of bytes is zero if any other error occurs.

Parameters

Name Type Description
fd File File descriptor associated with the file from which you want to read.
inCount int32 Number of bytes you want to read.
outCountp int32 * Address at which FMRead stores the number of bytes read. FMRead does not store any value if NULL is passed. This parameter is a pointer.
buffer UPtr Address where FMRead stores the data.

Return Value

MgErr, which can contain the following errors. If you receive errors from LabVIEW Manager functions, most error names correspond to LabVIEW error codes.

Value Corresponding Error Code or Description
noErrNo error.
mgArgErr1 or inCount < 0.
fEOF4
fIOErr6