# vceReadMessageText

Reads the message text for a specified voice message in a VOX file.

#### Prototype

DWORD vceReadMessageText ( VCEHD vh, unsigned message, void *buffer, unsigned bytes, unsigned *bytesread)

Argument | Description
vh | Handle of an open VOX file.
message | Any valid VOX file message number.
buffer | Pointer to a buffer to receive data.
bytes | Size of buffer.
bytesread | Pointer to the returned number of bytes read.

#### Return values

Return value | Description
SUCCESS |
CTAERR_FUNCTION_ACTIVE | Playing or recording is active on the context.
CTAERR_SVR_COMM | Server communication error.
VCEERR_INVALID_MESSAGE | Message number is not in the valid range for VOX files (0 through 32767).
VCEERR_WRONG_FILE_TYPE | Not a VOX file.

#### Details

vceReadMessageText reads auxiliary data for a specified message in a VOX file. Although the function name suggests that this function is used for textual data, the data can be any binary data.

#### See also

vceCopyMessageText, vceWriteMessageText

#### Example

/* Displays descriptive text for a message in an open VOX file. */
void myReadMessageText (VCEHD vh, unsigned message)
{
char buf[80];
unsigned bytesread;
if (vceReadMessageText (vh, message, buf, sizeof buf-1, &bytesread)
== SUCCESS
{
/* Ensure the buffer is null-terminated. */
buf[bytesread] = '\0';
printf ("[%] %s\n", message, buf);
}
}