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

 

Chapter 7 File Manager Functions

fNotFound

The file could not be found.

fNoPerm

Access denied (file/directory/disk is locked/protected).

fIsOpen

File is open or directory is not empty.

fIOErr

Unspecified I/O error occurred.

 

 

 

Locking a File Range

FLockOrUnlockRange

syntax

MgErr

FLockOrUnlockRange(fd, mode, offset,

 

 

count, lock);

FLockOrUnlockRange locks or unlocks a section of a file.

Parameter

Type

Description

fd

File

File descriptor associated with the file.

mode

int32

Position in the file relative to which

 

 

FLockOrUnlockRange determines the first byte

 

 

to lock or unlock.

 

 

If mode is fStart, the first byte to lock or unlock

 

 

is located offset bytes from the start of the file

 

 

(offset must be greater than or equal to 0).

 

 

If mode is fCurrent, the first byte to lock or

 

 

unlock is located offset bytes from the current

 

 

position mark (offset can be positive, 0, or

 

 

negative).

 

 

If mode is fEnd, the first byte to lock or unlock is

 

 

located offset bytes from the end of the file (offset

 

 

must be less that or equal to 0).

offset

int32

The position of the first byte to lock or unlock. The

 

 

position is the number of bytes from the beginning

 

 

of the file, the current position mark, or the end of

 

 

the file, as determined by mode.

count

int32

Number of bytes to lock or unlock starting at the

 

 

location specified by mode and offset.

lock

Bool32

A boolean that specifies whether

 

 

FLockOrUnlockRange locks or unlocks a range

 

 

of bytes. If lock is TRUE this functions locks a

 

 

range; if FALSE the function unlocks a range.

National Instruments Corporation

7-21

LabVIEW Code Interface Reference Manual

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