_llseek function
[This function is provided for compatibility with 16-bit versions of Windows. New applications should use the SetFilePointer function.]
Repositions the file pointer for the specified file.
Syntax
LONG _llseek(
HFile hFile,
lOffset LONG,
int nOrigin
);
Parameters
- hFile
-
A handle to an open file. This handle is created by _lcreat.
- LONG
-
The number of bytes that the file pointer is to be moved.
- nOrigin
-
The starting point and the direction that the pointer will be moved.
This parameter must be set to one of the following values.
Value Meaning - 0
Moves the pointer from the beginning of the file.
- 1
Moves the file from its current location.
- 2
Moves the pointer from the end of the file.
Return value
If the function succeeds, the return value specifies the new offset. Otherwise, the return value is HFILE_ERROR. To get extended error information, use the GetLastError function.
Remarks
When a file is initially opened, the file pointer is set to the beginning of the file. The _llseek function moves the pointer without reading data, which allows random access to the content of the file.
Requirements
|
Header |
|
|---|---|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 12/7/2012