Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Labview Code Interface Reference Manual.pdf
Скачиваний:
33
Добавлен:
29.05.2015
Размер:
1.13 Mб
Скачать

 

Chapter 7 File Manager Functions

fIsOpen

File is already open for writing. This error is returned only on the

 

Macintosh and the Sun. The PC returns fIOErr when the file is

 

already open for writing.

fNotFound

File not found.

fTMFOpen

Too many files open.

fIOErr

Unspecified I/O error occurred.

 

 

 

FMRead

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

FMRead reads inCount bytes from the file specified by the file descriptor fd. The function starts from the current position mark (see the FSeek and FTell functions), and reads the data into memory, starting at the address specified by buffer.

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 will be zero if any other error occurs.

 

Parameter

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 will not store any value if

 

 

 

NULL is passed.

 

 

 

See the Pointers as Parameters section of

 

 

 

Chapter 1, CIN Overview, for more information

 

 

 

about using this parameter.

 

buffer

UPtr

Address where FMRead will store the data.

returns

MgErr, which can contain the errors in the following list.

 

Error

Description

 

 

mgArgErr

Not a valid file descriptor or inCount < 0.

 

fEOF

EOF encountered.

 

fIOErr

Unspecified I/O error occurred.

 

 

 

 

FMWrite

National Instruments Corporation

7-9

LabVIEW Code Interface Reference Manual

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]