Voice Message Service Developer's Reference Manual (6422-12): Alphabetical Function Reference
(Page 32 of 40 in this chapter)
vceSetCurrentMessage
Description
- Defines a new current message.
Prototype
- DWORD vceSetCurrentMessage ( VCEHD vh,
unsigned message)
- vh Handle of an open voice object.
- message Message number in vh.
Return Values
Events
Details
- This function defines the current message for the CTA context implied by vh. It is a special case of vceSetCurrentList where the list consists of one message.
- Use this function to select a message prior to using position-oriented functions, which include vceSetPosition, vcePlay, vceRecord, vceErase, vceRead, and vceWrite.
- vceSetCurrentMessage will return SUCCESS for any message number that is valid for the file type of vh. Otherwise, the return code will be VCEERR_INVALID_MESSAGE.
- To define the current message as all messages in vh, concatenated in numerical order, specify VCE_ALL_MESSAGES as the message number.
- You cannot set the current message while play or record is active.
- Use vceGetCurrentList to query the current message.
See Also
- vceErase, vceGetCurrentList, vcePlay, vceRead, vceRecord, vceSetCurrentList, vceSetPosition, vceWrite
Example
/* Play the first 5 seconds of the specified message */
void myPreviewMessage (CTAHD ctahd, VCEHD vh, unsigned message)
{
CTA_EVENT event;
vceSetCurrentMessage (vh, message);
vcePlay (ctahd, 5000, NULL);
do
{
ctaWaitEvent( CtaQueueHd, &event, CTA_WAIT_FOREVER);
} while (event.id != VCEEVN_PLAY_DONE);/* Ignore other events */
}
(Page 32 of 40 in this chapter)
tech_support@nmss.com
Copyright © 1999, Natural MicroSystems, Inc. All rights
reserved.