(Page 13 of 40 in this chapter)


vceGetCurrentList

Description

Gets a copy of the list of messages comprising the current message.

Prototype

DWORD vceGetCurrentList ( CTAHD ctahd,
VCE_MESSAGE msglist[],
unsigned maxcount,
unsigned *actualcount)

ctahd Handle returned by ctaCreateContext.

msglist Pointer to an array of the VCE_MESSAGE structure:

typedef struct
{
VCEHD vh;
unsigned message;
} VCE_MESSAGE;
See the Details section for a description of these fields.

maxcount Number of elements in the msglist array.

actualcount Pointer to returned number of elements written to the msglist array.

Return Values

Events

Details

This function retrieves the list of messages comprising the current message for the CTA context specified by ctahd. The current message can contain a list of messages when set by vcePlayList or vceSetCurrentList.

The VCE_MESSAGE structure contains the following fields:

Field

Description

vh

Handle of an open voice object.

message

Message number in the voice object specified by vh.

The number of messages in the list is returned in actualcount unless actualcount is NULL.

If there is no current message, the function returns SUCCESS and zero (0) is returned in actualcount.

If maxcount is less than or equal to the actual list size, the function returns SUCCESS and the value returned in actualcount is maxcount.

You can get the list size of the current message with vceGetContextInfo.

See Also

vceGetContextInfo, vcePlayList, vceSetCurrentList

Example


/*Return the current message(or first message if current message is a list*/

void myGetCurrentMessage (CTAHD ctahd, VCEHD *vh, unsigned *message)
{
VCE_MESSAGE vcemsg;
unsigned actual;

vceGetCurrentList (ctahd, &vcemsg, 1, &actual);
if (actual == 0)
{
*message = VCE_UNDEFINED_MESSAGE;
*vh = 0;
}
else
{
*vh = vcemsg.vh;
*message = vcemsg.message;
}
}


(Page 13 of 40 in this chapter)


tech_support@nmss.com
Copyright © 1999, Natural MicroSystems, Inc. All rights reserved.