cwbCO_GetSystemName

Purpose

This function gets the iSeries™ system name that is associated with the specified system object.

Syntax

 
UINT CWB_ENTRY cwbCO_GetSystemName(
                              cwbCO_SysHandle    system,
                              LPSTR              sysName,
                              PULONG             length );

Parameters

cwbCO_SysHandle system - input
Handle that previously was returned from cwbCO_CreateSystem or cwbCO_CreateSystemLike. It identifies the iSeries system.
LPSTR sysName - output
Pointer to a buffer that will contain the NULL-terminated system name. The name will be CWBCO_MAX_SYS_NAME characters long at most, not including the terminating NULL.
PULONG length - input/output
Pointer to the length of the sysName buffer. If the buffer is too small to hold the system name, including room for the terminating NULL, the size of the buffer needed will be filled into this parameter and CWB_BUFFER_OVERFLOW will be returned.

Return Codes

The following list shows common return values.

CWB_OK
Successful completion.
CWB_INVALID_API_HANDLE
Invalid system handle.
CWB_INVALID_POINTER
One of the pointer parameters passed in is NULL.
CWB_BUFFER_OVERFLOW
The sysName buffer is not large enough to hold the entire system name.

Usage

None.