vceEraseMessage

Deletes the specified message from the specified voice object.

Prototype

DWORD vceEraseMessage ( VCEHD vh, unsigned message)

Argument

Description

vh

Handle of an open voice object.

message

Message number.


Return values

Return value

Description

SUCCESS

 

CTAERR_FUNCTION_ACTIVE

Playing or recording is active.

CTAERR_INVALID_HANDLE

vh is not a valid handle to an open voice object.

CTAERR_SVR_COMM

Server communication error.

VCEERR_INVALID_MESSAGE

Invalid message number for the file type.

VCEERR_PLAY_ONLY

Voice object is not open for record.


Details

vceEraseMessage deletes the message in the voice object that vh specified by changing its size to zero (0). The specified message becomes the current message in the context associated with vh. The voice object must be open for record.

To erase all messages in vh, specify VCE_ALL_MESSAGES as the message number.

vceEraseMessage returns SUCCESS for any message number that is valid for the file type of vh. Otherwise, the return code is VCEERR_INVALID_MESSAGE.

See also

vceErase

Example

/* Replace or create a message from a data buffer */

void myWriteMessage (CTAHD ctahd, VCEHD vh, unsigned message,
                                char *buffer, unsigned bytes)
{
    vceEraseMessage (vh, message);
    vceWrite(ctahd, buffer, bytes, VCE_INSERT, NULL);
}