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

Chapter 7 File Manager Functions

syntax

MgErr

FMWrite(fd, inCount, outCountp, buffer);

FMWrite 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 (see the FSeek and FTell functions).

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

 

Parameter

Type

Description

 

fd

File

File descriptor associated with the file to 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 actually written. FMWrite 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 of the data you want to write.

returns

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

 

Error

Description

 

 

 

mgArgErr

Not a valid file descriptor or inCount < 0.

 

fDiskFull

Out of space.

 

 

 

fNoPerm

Access denied.

 

 

 

fIOErr

Unspecified write error occurred.

 

 

 

 

 

Positioning the Current Position Mark

FMSeek

syntax

MgErr

FMSeek(fd, ofst, mode);

FMSeek sets the current position mark for a file to the specified point, relative to the beginning of the file, the current position in the file, or the end of the file. If an error occurs, the current position mark does not move.

Parameter

Type

Description

LabVIEW Code Interface Reference Manual

7-10

National Instruments Corporation

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