ilEFSSeek(3X)
NAME
ilEFSSeek() − position a file to a page for reading by ilEFSReadImage()
SYNOPSIS
ilBool
ilEFSSeek (
ilEFSFile file,
long page,
void *pOptions);
DESCRIPTION
ilEFSSeek() positions a file to the page identified, so that this page is read by the next call to ilEFSReadImage() for this file.
A call to ilEFSSeek() invalidates all pipes that began with a call to ilEFSReadImage() for the same file. The result of executing such pipes is undefined.
file is a file opened with an openMode of IL_EFS_READ.
page is the page to be read, with the first page in the file being zero (0). If page is beyond the end of the file, this call positions to the last page in the file.
*pOptions must be NULL; this parameter is reserved for future use.
RETURN VALUE
Upon successful completion, ilEFSSeek() returns TRUE. If the file type does not support multi-page reads, which is the case when the expression (ilEFSFileTypeInfo.attributes & IL_EFS_MULTI_PAGE_READS), is equal to 0, ilEFSSeek() also returns TRUE, because the file is always positioned to the first and only page.
ERRORS
If the call fails, context->error receives a non-zero error code.
EXAMPLE
The following example positions the file to the last page.
ilEFSFile file;
ilEFSFileInfo info;
.
.
.
if (!ilEFSGetFileInfo(file, &info)) return (context->error);
if (!ilEFSSeek(file, (info.nPages-1), NULL))
return (context->error);
AUTHOR
ilEFSSeek() was developed by HP.
SEE ALSO
ilEFSReadImage(3X), ilEFSSeek(3X), ilerror(3X).
Using the Image Developer’s Kit.
Hewlett-Packard Company — Image Library: February, 1995