vceGetOpenInfo

Returns status information about an open voice object.

Prototype

DWORD vceGetOpenInfo ( VCEHD vh, VCE_OPEN_INFO *openinfo, unsigned size)

Argument

Description

vh

Handle of an open voice object.

openinfo

Pointer to a buffer to receive the following structure:

typedef struct
{
  DWORD size;
  DWORD filetype;
  DWORD openmode;
  DWORD encoding;
  CTAHD ctahd;
} VCE_OPEN_INFO;

Refer to the Details section for a description of these fields.

size

Size, in bytes, of the openinfo buffer.


Return values

Return value

Description

SUCCESS

 

CTAERR_BAD_SIZE

size is less than the size of DWORD.

CTAERR_INVALID_HANDLE

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

CTAERR_SVR_COMM

Server communication error.


Details

vceGetOpenInfo returns status information about an open voice file or memory object.

The VCE_OPEN_INFO structure contains the following fields:

Field

Description

size

Number of bytes written to the buffer to which openinfo points.

filetype

Type of voice file (VCE_FILETYPE_xxx), or zero (0) if memory.

openmode

VCE_PLAY_ONLY or VCE_PLAY_RECORD.

encoding

Voice encoding of all messages in the file or memory block.

ctahd

Context handle used when vh is obtained.


The VCE_OPEN_INFO data remains constant for a given handle as long as it is open.

Use vceGetContextInfo to get the status of the context that ctahd identifies.

Use vceGetEncodingInfo for information about the encoding.

Example

/* Get the encoding of an open voice file*/

unsigned myGetEncoding (VCEHD vh)
{
    VCE_OPEN_INFO openinfo;

    if (vceGetOpenInfo (vh, &openinfo, sizeof openinfo) != SUCCESS)
        return 0;
    return openinfo.encoding;
}