TextToSpeechVersion(3dtk)

Name

TextToSpeechVersion - Requests version information from DECtalk Software, allowing an application to test for DECtalk Software API (DAPI) version compatibility.

Syntax
    DWORD TextToSpeechVersion (LPSTR *VersionStr)

Parameters

LPSTR *VersionStr
    Returns the address of a pointer to an array of characters containing text information, or NULL for no text information.

Description

This function requests version information from DECtalk that allows the calling application to test for DAPI version compatibility. The function returns a numerically encoded version number and additionally may return a pointer to a text buffer in the VersionStr parameter.

Return Values

This function returns a value of type DWORD that is encoded with both the DAPI build version and the DECtalk Software version. The encoding is as follows:

Version | Bits Used
DECtalk Major Version
 | Bits 31-24
DECtalk Minor Version
 | Bits 23-16
DAPI Major Version
 | Bits 15-8
DAPI Minor Version
 | Bits 7-0

If the DAPI Major Version is not the same as the DAPI Major Version the DECtalk application was compiled with, the DAPI is no longer compatible and the application may crash during further calls into the DAPI.

If the DAPI Minor Version is lower than the version of the DAPI the DECtalk application was compiled with, some features that are expected may not be present or functional in the DAPI.

For safety, your applications should perform the following check:
    if (DAPI_Major_Version != Build_Major_Version) Error();
    if (DAPI_Minor_Version < Build_Minor_Version) Error();
    success();

This allows your application to avoid the majority of incompatability bugs that could arise from DECtalk version mismatching.