cwbCO_GetEnvironmentName
Use the cwbCO_GetEnvironmentName command.
Purpose
Get the name of the environment corresponding to the index.
Syntax
unsigned int CWB_ENTRY cwbCO_GetEnvironmentName(
char *environmentName,
unsigned long *bufferSize,
unsigned long index);
Parameters
- char *environmentName - output
- Pointer to a buffer that will contain the environment name. This buffer should be large enough to hold at least CWBCO_MAX_ENV_NAME + 1 characters, including the terminating NULL character.
- unsigned long * bufferSize - input/output
-
- input
- Size of the buffer pointed to by *environmentName.
- output
- Size of buffer needed, if the buffer provided was too small.
- unsigned long index - input
- 0 corresponds to the first environment.
Return Codes
The following list shows common return values:
- CWB_OK
- Successful Completion.
- CWB_INVALID_POINTER
- One or more pointer parameters are NULL.
- CWB_BUFFER_OVERFLOW
- Not enough room in output buffer to hold entire environment name. Use *bufferSize 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_END_OF_LIST
- The end of the environments list has been reached. No environment name was returned.
- CWB_NOT_ENOUGH_MEMORY
- Insufficient memory; may have failed to allocate temporary buffer.
- CWB_API_ERROR
- General API failure.
Usage
None.