vceWriteMessageText

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

Prototype

DWORD vceWriteMessageText ( VCEHD vh, unsigned message, void *buffer, unsigned size)

Argument

Description

vh

Handle of an open VOX file.

message

Any valid VOX file message number.

buffer

Pointer to a buffer of data to write.

size

Amount of data to write.


Return values

Return value

Description

SUCCESS

 

CTAERR_DISK_FULL

There is not enough room on the disk to complete the write operation. No data was written.

CTAERR_SVR_COMM

Server communication error.

VCEERR_INVALID_MESSAGE

Message number is not in the valid range for VOX files (0 through 32767).

VCEERR_OUT_OF_INDICES

Destination VOX file contains no free header entries.

VCEERR_PLAY_ONLY

Voice file was not opened for record.

VCEERR_WRONG_FILE_TYPE

Not a VOX file.


Details

vceWriteMessageText stores auxiliary data for a specified message in a VOX file. The data can be text or binary. Existing data for message is replaced with the new data.

To erase message data for a specific message, set size to zero (0). buffer can be NULL in this case. To erase all message data, set message number to VCE_ALL_MESSAGES and set size to zero (0).

vceWriteMessageText does not affect the current message for the context.

Rewriting with different size buffers can result in file fragmentation. To use the message text to store dynamic information (for example, a message time stamp), use a fixed size for all writes.

See also

vceCopyMessageText, vceReadMessageText

Example

/* Add text to a message in an open VOX file */

void myAddMessageText (VCEHD vh, unsigned message, char *text)
{
    unsigned size = strlen(text) ;

    vceWriteMessageText (vh, message, text, size);
}