CWBSO_DisplayList

Purpose

Displays the list in a window. From this window, the user is allowed to perform actions on the objects in the list.

Syntax

 
unsigned int CWB_ENTRY CWBSO_DisplayList(
                CWBSO_LIST_HANDLE listHandle,           
                HINSTANCE hInstance,                    
                int nCmdShow,                           
                HWND far* lphWnd ,                      
                CWBSO_ERR_HANDLE errorHandle);          

Parameters

CWBSO_LIST_HANDLE listHandle - input
A handle to a list that was returned by a previous call to CWBSO_CreateListHandle or CWBSO_CreateListHandleEx.
HINSTANCE hInstance - input
The program instance passed to the calling program's WinMain procedure.
int nCmdShow - input
The show window parameter passed to the calling program's WinMain procedure. Alternatively, any of the constants defined for the Windows® API ShowWindow() may be used.
HWND far* lphWnd - output
A long pointer to a window handle. This will be set to the handle of the window in which the list is displayed.
CWBSO_ERR_HANDLE errorHandle - input
A handle to an error object. If an error occurs that there is error text for, this handle may be used to retreive the error message text or display the error to the user.

Return Codes

The following list shows common return values.

CWBSO_NO_ERROR
No error occurred.
CWBSO_BAD_LIST_HANDLE
The list handle that is specified is not valid.
CWBSO_BAD_ERR_HANDLE
The error handle that is specified is not valid.
CWBSO_DISPLAY_FAILED
The window could not be created.
CWBSO_LOW_MEMORY
Not enough memory is available for the request.
CWBSO_ERROR_OCCURRED
An error occurred. Use error handle for more information.

Usage

CWBSO_CreateListHandle must be called prior to calling this API. The list handle that is returned by CWBSO_CreateListHandle must be passed as input to this API. CWBSO_CreateErrorHandle must be called prior to calling this API. The error handle that is returned by CWBSO_CreateErrorHandle must be passed as input to this API. It is not necessary to call CWBSO_OpenList or CWBSO_CloseList when using this API. CWBSO_DisplayList handles both the opening and closing of the list. Your program must have a message loop to receive the Windows messages that will be sent during the use of the system object list.

This API only applies to the following list types: Jobs, Messages, Printers, Printer Output, and Spooled Files.