ISpSREngine::SetContextState (Windows Embedded CE 6.0)
1/6/2010
This method sets a recognition context state. SAPI calls the method when a recognition context has been stopped or started by the application calling ISpRecoContext::SetContextState.
For standard CFG and dictation grammars, the engine might not need to take any account of the context state, as SAPI automatically activates and deactivates the grammars contained in the context. However, for proprietary grammars the engine might need to look at the context state.
Syntax
HRESULT SetContextState(
void* pvEngineContext,
SPCONTEXTSTATE eContextState
);
Parameters
- pvEngineContext
[in] Pointer to the recognition context, as retrieved from a prior call to ISpSREngine::OnCreateRecoContext.
- eContextState
[in] A value specifying the new recognition context state. Possible values are defined for the SPCONTEXTSTATE enumeration.
Return Value
The following table shows the possible return values.
Value | Description |
---|---|
S_OK |
Function completed successfully. |
FAILED(hr) |
Appropriate error message. |
Requirements
Header | sapiddk.h, sapiddk.idl |
Library | sapilib.lib |
Windows Embedded CE | Windows CE .NET 4.1 and later |