cwbOBJ_SeekSplF

Purpose

Moves the current read position on a spooled file that is open for reading.

Syntax

 
unsigned int CWB_ENTRY  cwbOBJ_SeekSplF(
                               cwbOBJ_ObjHandle   splFHandle,
                               cwbOBJ_SeekOrigin  seekOrigin,
                               signed long        seekOffset,
                               cwbSV_ErrHandle    errorHandle);

Parameters

cwbOBJ_ObjHandle splFHandle - input
Handle of the spooled file to be closed.
cwbOBJ_SeekOrigin seekOrigin - input
Where to seek from. Valid values are:
  • CWBOBJ_SEEK_BEGINNING - seek from the beginning of file
  • CWBOBJ_SEEK_CURRENT - seek from the current read position
  • CWBOBJ_SEEK_ENDING - seek from the end of the file
signed long seekOffset - input
Offset (negative or positive) from the seek origin in bytes to move the current read pointer to.
cwbSV_ErrHandle errorHandle - output
Optional, may be 0. Any returned messages will be written to this object. It is created with the cwbSV_CreateErrHandle() API. The messages may be retrieved through the cwbSV_GetErrText() API. If the parameter is set to zero, no messages will be retrievable.

Return Codes

The following list shows common return values.

CWB_NO_ERROR
Successful completion.
CWB_NOT_ENOUGH_MEMORY
Insufficient memory.
CWB_INVALID_HANDLE
Handle is not valid spooled file handle.
CWB_INVALID_PARAMETER
Invalid parameter specified.
CWBOBJ_RC_HOST_ERROR
Host error occurred. Text may be in errorHandle.
CWBOBJ_RC_SPLFNOTOPEN
Spooled file has not been opened yet.
CWBOBJ_RC_SEEKOUTOFRANGE
Seek offset out of range.

Usage

The cwbOBJ_OpenSplF() API must be called with this spooled file handle before this API is called.