# dispGetText

Returns the text representation of errors, reasons, events, and commands.

#### Prototype

DWORD dispGetText (DWORD code, char *buffer, unsigned size)

Argument | Description
code | Error, reason, event, or command code.
buffer | Pointer to the returned text.
size | Size of buffer in bytes.

#### Return values

Return value | Description
SUCCESS |
CTAERR_BAD_ARGUMENT | buffer passed as NULL.
CTAERR_BAD_SIZE | size passed as zero (0).
CTAERR_NOT_INITIALIZED | Natural Access is not initialized.
CTAERR_SVR_COMM | Natural Access Server is not running.

#### Details

dispGetText returns a text string in buffer corresponding to the Natural Access error, reason, event, or command code. It finds a service matching the service ID indicated in the upper word of code. All services with the same service ID should be capable of translating code to its text representation.

If buffer passed in is not large enough to contain the full string, only as many characters are copied as can fit into buffer including a null terminator.

#### See also

xxxFormatMessage, xxxGetText