cwbCO_GetHostVersionEx

Purpose

Get the version and release level of the host.

Syntax

 
UINT CWB_ENTRY cwbCO_GetHostVersionEx(
                             cwbCO_SysHandle         system,
                             PULONG                  version,
                             PULONG                  release);

Parameters

cwbCO_SysHandle system - input
Handle that previously was returned from cwbCO_CreateSystem or cwbCO_CreateSystemLike. It identifies the iSeries™ system.
PULONG version - output
Pointer to a buffer where the version level of the system is returned.
PULONG release - output
Pointer to a buffer where the release level of the system is returned.

Return Codes

The following list shows common return values:

CWB_OK
Successful Completion.
CWB_NOT_CONNECTED
The system has never been connected to when using the currently active environment.
CWB_INVALID_POINTER
One of the pointers passed in is NULL.
CWB_NOT_ENOUGH_MEMORY
Insufficient memory; may have failed to allocate a temporary buffer.

Usage

The host version is retrieved and saved whenever a connection is made to the iSeries system. If no connection has been made yet to this iSeries system in the currently-active environment, this information will not be available, and the error code CWB_NOT_CONNECTED will be returned. If you know that a connection to the iSeries system recently was made successfully, it is likely that the version and release levels returned are current. If you want to make sure that the values are available and recently have been retrieved, call cwbCO_Signon or cwbCO_Connect for this system object first, then call cwbCO_GetHostVersionEx.