lseek
int lseek (int fileHandle, long offset, int origin);
Purpose
Sets the file position indicator for the specified file handle. The value specified by offset is added to the position designated by origin. A successful call to this function clears the end-of-file indicator for the file handle. After a call to this function, the next operation can be either input or output.
![]() |
Note This function is not in the ANSI standard. To use this function, you must include lowlvlio.h in your program or interactive window. |
Parameters
Input | ||||||||||||||
Name | Type | Description | ||||||||||||
fileHandle | int | Contains a file handle whose associated file position indicator is set. | ||||||||||||
offset | long | Contains the number of bytes beyond the designated origin to set the file position indicator. | ||||||||||||
origin | int |
Contains the origin to which the specified
offset is added in computing the new file position. The
following gives a description of the selections available:
|
Return Value
Name | Type | Description |
status | int | Contains the returned status of the function. If successful, lseek returns 0. If an error occurs, lseek returns a nonzero value and sets errno to a nonzero value. |
Additional Information
Library: ANSI C Library
Include file: lowlvlio.h
LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later