ILexPronounce::Get

HRESULT Get(VOICECHARSET CharSet, TCHAR *pszText, WORD wSense,
TCHAR *pszPronounce, DWORD dwPronounceSize,
DWORD *pdwPronounceNeeded, VOICEPARTOFSPEECH *pPartOfSpeech,
PVOID pEngineInfo, DWORD dwEngineInfoSize,
DWORD *pdwEngineInfoNeeded);

Retrieves the pronunciation, part of speech, and optional engine information of the given word from the lexicon.

· Returns NOERROR if successful, or one of these error values:

E_INVALIDARG
E_OUTOFMEMORY
LEXERR_ENGBUFTOOSMALL
LEXERR_INVALIDSENSE
LEXERR_INVALIDTEXTCHAR
LEXERR_PRNBUFTOOSMALL

CharSet

[in] Character set to use for the pronunciation.

pszText

[in] Address of a string that contains the word.

wSense

[in] Alternate pronunciation or meaning of the word. Sense numbers start at zero and increment sequentially. If the sense does not exist, the function returns an error.

pszPronounce

[out] Address of a buffer that receives the phonetic or phonemic transcription of pszText. If the buffer is too small, no information is copied.

dwPronounceSize

[in] Number of bytes available in pszPronounce. If this number is too small, the function returns an error, and pdwPronounceNeeded receives the number of bytes needed.

pdwPronounceNeeded

[out] Address of a variable that receives the size, in bytes, that the buffer specified by pszPronounce needs to be to receive the transcription of pszText.

pPartOfSpeech

[out] Address of a variable that receives a value indicating the part of speech for the word. For a list of possible values, see the description of the VOICEPARTOFSPEECH enumeration.

pEngineInfo

[out] Address of a buffer that receives additional information about the word. This parameter can be NULL if the engine does not maintain additional information or if the application does not need to receive it.

dwEngineInfoSize

[in] Number of bytes of data pointed to by pEngineInfo. If this number is too small, the function returns an error and fills pdwEngineInfoNeeded with the number of bytes needed (unless pdwEngineInfoNeeded is NULL).

pdwEngineInfoNeeded

[out] Address of a variable that receives the size, in bytes, that the buffer specified by pEngineInfo needs to be to receive additional information about the word. If this parameter is NULL, the function does not return the size.

If dwPronounceSize and dwEngineInfoSize are zero, pdwPronounceNeeded and pdwEngineInfoNeeded are filled in and pszPronounce and pEngineInfo are ignored.

The pronunciation lexicon may have several versions of the same word, each representing a different pronunciation and part of speech.