(Page 33 of 41 in this chapter) Version
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 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 33 of 41 in this chapter) Version
Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2001, Natural MicroSystems, Inc. All rights
reserved.