#include <lzexpand.h> |
LONG LZSeek(hf, lOffset, nOrigin) | |||||
HFILE hf; | /* handle of file, */ | ||||
long lOffset; | /* number of bytes to move | */ | |||
int nOrigin; | /* original position, */ |
The LZSeek function moves a file pointer from its original position to a new position.
hf
Identifies the source file.
lOffset
Specifies the number of bytes by which the file pointer should be moved.
nOrigin
Specifies the starting position of the pointer. This parameter must be one of the following values:
Value | Meaning |
0 | Move the file pointer lOffset bytes from the beginning of the file. |
1 | Move the file pointer lOffset bytes from the current position. |
2 | Move the file pointer lOffset bytes from the end of the file. |
The return value is the offset from the beginning of the file to the new pointer position, if the function is successful. Otherwise, it is an error value that is less than zero and may be one of the following:
Value | Meaning |
LZERROR_BADINHANDLE | The handle identifying the source file was invalid. |
LZERROR_BADVALUE | One of the parameters exceeds the range of valid values. |
LZERROR_GLOBLOCK | The handle identifying the initialization data is invalid. |
If the file is not compressed, LZSeek calls the _llseek function and moves the file pointer by the specified offset.
If the file is compressed, LZSeek emulates _llseek on an expanded image of the file.