CWBSO_CreateListHandle

Purpose

Creates a new list and returns a handle to the list.

Syntax

 
unsigned int CWB_ENTRY CWBSO_CreateListHandle(
                char far* lpszSystemName,               
                char far* lpszApplicationName,          
                CWBSO_LISTTYPE type,                    
                CWBSO_LIST_HANDLE far* lpListHandle);   

Parameters

char far* lpszSystemName - input
The name of the iSeries™ system on which the list will be built. The name that is specified must be a configured iSeries server. If the client is not currently connected to the iSeries server, a connection will be established when the list is opened. If NULL is specified for the system name, the current iSeries Access default system will be used.
char far* lpszApplicationName - input
A character string that identifies the application that will be interacting with the list. The maximum length of this string is 10 characters, excluding the NULL terminator.
CWBSO_LISTTYPE type - input
The type of list to be built. Specify one of the following:
CWBSO_LIST_JOB
List of jobs.
CWBSO_LIST_SJOB
List of server jobs.
CWBSO_LIST_SJOB
List of server jobs.
CWBSO_LIST_MSG
List of messages.
CWBSO_LIST_PRT
List of printers.
CWBSO_LIST_SFL
List of spooled files.
CWBSO_LIST_IFC
List interfaces.
CWBSO_LIST_ELN
List Ethernet lines.
CWBSO_LIST_TLN
List token-ring lines.
CWBSO_LIST_HWL
List hardware resources.
CWBSO_LIST_SW
List software products.
CWBSO_LIST_RTE
List TCP/IP route.
CWBSO_LIST_PRF
List user profiles.
CWBSO_LIST_SMP
List libraries in QSYS.
CWBSO_LIST_HANDLE far* lpListHandle - output
A long pointer to a handle that will be set to the handle for the newly created list. This handle may be used with any other API that accepts a list handle.

Return Codes

The following list shows common return values.

CWBSO_NO_ERROR
No error occurred.
CWBSO_BAD_LISTTYPE
The value that is specified for type of list is not valid.
CWBSO_LOW_MEMORY
Not enough memory is available for the request.
CWBSO_BAD_SYSTEM_NAME
The system name that is specified is not a valid iSeries system name.

Usage

When the list is no longer needed, the calling program is responsible for doing the following: