cwbCO_GetDefaultSysName

Purpose

Get the name of the default system in the active environment.

Syntax

 
unsigned int CWB_ENTRY cwbCO_GetDefaultSysName(
                             char               *defaultSystemName,
                             unsigned long       bufferSize,
                             unsigned long      *needed,
                             cwbSV_ErrHandle     errorHandle);

Parameters

char *defaultSystemName - output
Pointer to a buffer that will contain the NULL-terminated system name. This buffer should be large enough to hold at least CWBCO_MAX_SYS_NAME + 1 characters, including the terminating NULL character.
unsigned long bufferSize - input
Size of input buffer.
unsigned long *needed - output
Number of bytes needed to hold entire system name including the terminating NULL.
cwbSV_ErrorHandle errorhandle - input
If the API call fails, the message object associated with this handle will be filled in with message text that describes the error. If this parameter is zero, no messages will be available.

Return Codes

The following list shows common return values:

CWB_OK
Successful Completion.
CWB_INVALID_POINTER
Pointer to the system name or pointer to buffer size needed is NULL. Check messages in the History Log to determine which are NULL.
CWB_BUFFER_OVERFLOW
Not enough room in output buffer to hold the entire system name. Use *needed to determine the correct size. No error message is logged to the History Log since the caller is expected to recover from this error and continue.
CWBCO_DEFAULT_SYSTEM_NOT_DEFINED
The setting for the default system has not been defined in the active environment.
CWB_NOT_ENOUGH_MEMORY
Insufficient memory; may have failed to allocate temporary buffer.
CWB_API_ERROR
General API failure.

Usage

None.