Compartilhar via


ISpRecoContext::SetContextState (Windows CE 5.0)

Send Feedback

This method sets the state of the recognition context.

HRESULT SetContextState(SPCONTEXTSTATE eContextState);

Parameters

  • eContextState
    [in] The recognition context state. Possible values are defined for the. SPCONTEXTSTATE enumeration.

Return Values

The following table shows the possible return values.

Value Description
S_OK Function completed successfully.
E_INVALIDARG eContextState is not one of the correct types.
FAILED(hr) Appropriate error message.

Remarks

The default recognition context state for an ISpRecoContext object is SPCS_ENABLED.

Applications can use ISpRecoContext::SetContextState to toggle sets of grammars. For example, a multi-document interface application that uses a different ISpRecoContext object for each document could toggle the context states as each document gained and lost the focus.

Applications can use ISpRecoContext::GetContextState to query the context state.

Requirements

OS Versions: Windows CE .NET 4.1 and later.
Header: Sapi.h, Sapi.idl.
Link Library: Sapilib.lib.

See Also

ISpRecoContext | SAPI Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.