# vceGetUniqueMessageNumber

Returns the lowest unused message number in an open voice object.

#### Prototype

DWORD vceGetUniqueMessageNumber ( VCEHD vh, unsigned *message)

Argument | Description
vh | Handle of an open voice object.
message | Pointer to a returned message number or VCE_UNDEFINED_MESSAGE.

#### Return values

Return value | Description
SUCCESS |
CTAERR_INVALID_HANDLE | vh is not a valid handle to an open voice object.
CTAERR_SVR_COMM | Server communication error.

#### Details

Use vceGetUniqueMessageNumber to obtain a message number before recording a new message. This function returns the lowest empty (0-length) message in the open voice object. If the order of the messages must be maintained, use vceGetHighMessageNumber.

The returned message number is VCE_UNDEFINED_MESSAGE if there are no unused message numbers in the voice object.

vceGetUniqueMessageNumber does not affect the current message.

#### See also

vceGetMessageSize

#### Example

/* Start recording a new message */
void myAddMessage (VCEHD vh, unsigned *message)
{
vceGetUniqueMessageNumber (vh, message) ;
vceRecordMessage (vh, *message, VCE_NO_TIME_LIMIT, NULL) ;
}