cwbOBJ_DisplaySplF

Purpose

Displays the specified spooled file to the user.

Syntax

 
unsigned int CWB_ENTRY  cwbOBJ_DisplaySplF(
                               cwbOBJ_ObjHandle     splFHandle,
                               const char          *view,
                               const unsigned long  flags,
                               cwbSV_ErrHandle      errorHandle);

Parameters

cwbOBJ_ObjHandle splFHandle - input
Handle of the parameter object.
const char *view - input
Optional, may be NULL. If specified it is a pointer to an ASCIIZ string that specifies the view to use when invoking the spooled file viewer. The are two predefined views shipped with the viewer:
  1. LETTER (8.5" x 11")
  2. SFLVIEW (132 column)
Users may also add their own.
const unsigned long flags - input
Any of following bits may be set: CWBOBJ_DSPSPLF_WAIT - instructs this call to wait until the viewer process has successfully opened the spooled file before returning. If this bit is 0, this API will return after it starts the viewer process. If it is 1, this API will wait for the viewer to get the spooled file open before returning. All other bits must be set to 0.
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_OK
Successful completion.
CWB_NOT_ENOUGH_MEMORY
Insufficient memory.
CWB_INVALID_HANDLE
Handle is not an allocated object handle.
CWB_NO_VIEWER
The viewer support for ClientAccess/400 was not installed.
CWB_NON_REPRESENTABLE_UNICODE_CHAR
One or more input Unicode characters have no representation in the codepage being used.
CWB_API_ERROR
General API failure.

Usage

Use this API to bring up the AFP™ viewer on the specified spooled file. The AFP viewer can view AFP data, SCS data and plain ASCII text data. A return code of CWB_NO_VIEWER means that the viewer component was not installed on the workstation.