FLockOrUnlockRange (LabVIEW Manager Function)

MgErr FLockOrUnlockRange(fd, mode, offset, count, lock);

Purpose

Locks or unlocks a section of a file.

Parameters

Name 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, using the following values:
  • 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.
  • fCurrent—The first byte to lock or unlock is located offset bytes from the current position mark. offset can be positive, 0, or negative.
  • 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 Indicates whether FLockOrUnlockRange locks or unlocks a range of bytes. If TRUE the function locks a range. If FALSE the function unlocks a range.

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