Share via


SetWordList Function

SetWordList Function

Sets the word list for the current recognizer context to recognize.

Syntax

[C++]

HRESULT WINAPI SetWordList(
  HRECOCONTEXT hrc,
  HRECOWORDLIST hwl
);

Parameters

hrc

[in] Handle to the recognizer context.

hwl

[in] Handle to recognition word list to be used.

Return Value

HRESULT value Description
S_OK Success.
E_POINTER The context is invalid or one of the parameters is an invalid pointer.
E_NOTIMPL The recognizer does not support this function.
E_OUTOFMEMORY Unable to allocate memory to complete the operation.
E_FAIL The method was called after Process has been called.

Remarks

The word list passed in as the second parameter must already exist. You create a word list by using the MakeWordList function. The SetWordList function does not alter the word list.

It is possible to un-set the wordlist by passing NULL as a second parameter.

It is recommended that you limit the length of individual words in the wordlist to no more than 256 characters and limit memory allocation for wordlists to no more than 128 MB.