Export (0) Print
Expand All

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

ValueMeaning
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

Winbase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

SetFilePointer

 

 

Community Additions

ADD
Show:
© 2014 Microsoft