TextToSpeechCloseLang(3dtk)

Name

TextToSpeechCloseLang - Closes an instance of an installed language and attempts to unload it from the DECtalk Multi-Language (ML) engine.

Syntax
    BOOL TextToSpeechCloseLang (char *lang)

Parameters

char *lang
    Specifies the language being unloaded; passed as a null-terminated string containing the two-character language ID.

Description

This function closes an instance of an installed language and attempts to unload it from the DECtalk Multi-Language (ML) engine.

Call this function for each thread using the selected language. When a thread returns TRUE, the language is freed and can be uninstalled or upgraded.

A return value of FALSE may indicate invalid passing of the lang variable or more instances of the language still loaded. If there are more instances, the function frees the current instance and returns FALSE.

After calling TextToSpeechCloseLang(), assume that the language handle is no longer valid.

Return Values

Returns TRUE when a language is successfully unloaded, or FALSE when the operation cannot be completed or more instances have the thread started.

Example
    BOOL stop_us (void) {
         if (TextToSpeechCloseLang ("us") == FALSE {
             printf ("Another thread has the language\n");
             printf ("still loaded.\n");
             return FALSE;
         }
         printf ("The language has been freed.\n");
         return TRUE;
     }

See Also

TextToSpeechEnumLangs(3dtk), TextToSpeechSelectLang(3dtk), TextToSpeechStartLang(3dtk)