IVCmdUserWord::GetPhraseList

This method gets the words in the installed vocabulary.

Syntax

HRESULT GetPhraseList( DWORD dwFlags, PWSTR pszBuf PDWORD *pdwSize);

Parameters

dwFlags
Specifies a bitmask of flags. It is one or a combination of the following flags:
SRPHRASE_SI
Returns the speaker-independent list.
SRPHRASE_SD
Returns the speaker-dependent list.

If both flags are set, the combined list is returned.

pszBuf
Pointer to the buffer where the phrase list is stored. The buffer contains a list of null-terminated strings. The list is terminated by two consecutive null characters.
pdwSize
Pointer to the size of the buffer allocated to hold the list, in bytes. If the method returns successfully, it holds the actual number of bytes in the buffer.

Return Values

NOERROR indicates success.

VCMDERR_VALUEOUTOFRANGE indicates that the buffer is too small. When this occurs, GetPhraseList sets pdwSize to the buffer size needed.

If dwFlags is set to SRPHRASE_SI and the speech engine supports any word—for example, if the engine is a phomeme-based continuous engine—the function returns S_FALSE.

If an error occurs, the appropriate HRESULT value is returned.

Remarks

If both SRPHRASE_SI and SRPHRASE_SD are set, and if a word has both speaker-independent and speaker-dependent templates, the same word appears twice in the buffer.