ISRGramDictation::Context

HRESULT Context(PTSTR pszPrior, PTSTR pszAfter);

Provides a speech-recognition engine with context � that is, the words spoken before and after the current utterance.

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

E_INVALIDARG
E_OUTOFMEMORY
SRERR_NOTSUPPORTED

pszPrior

[in] Address of a null-terminated string that contains the words spoken before the current utterance. For example, the words "This is" might precede the utterance "a test." The string can include punctuation. This parameter can be NULL.

pszAfter

[in] Address of a null-terminated string that contains the words spoken after the current utterance. For example, "of the emergency broadcasting system." The string can include punctuation. This parameter can be NULL.

For best performance, the application should pass only a sentence or two for each parameter.

An application calls Context whenever the cursor position changes in the document being dictated. Because the application may call Context several times in quick succession while the speaker scrolls through a document, the engine should not do a lot of processing during the call.

If an engine does not support contexts, it ignores this function.