FMWrite (LabVIEW Manager Function)

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

Purpose

Writes inCount bytes from memory, starting at the address specified by buffer, to the file specified by the file descriptor fd, starting from the current position mark. 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 written in *outCountp. The number of bytes stored can be less than inCount if an fDiskFull error occurs before the function writes inCount bytes. The number of bytes stored is zero if any other error occurs.

Parameters

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

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.
fIOErr6
fNoPerm8
fDiskFull9