ISpRecognizer::CreateRecoContext

This method creates a recognition context for the SR engine. The recognition context is used to load recognition grammars, start and stop recognition, and receive events and recognition results.

Typically each application uses only one recognition context. However, an application can have more more than one context in certain circumstances.

HRESULT CreateRecoContext(
  ISpRecoContext** ppNewContext
);

Parameters

  • ppNewContext
    [out] Address of a pointer to an object implementing the ISpRecoContext interface.

Return Values

The following table shows the possible return values.

Value Description
S_OK Function completed successfully.
E_POINTER ppNewContext is invalid or bad.
FAILED(hr) Appropriate error message.

Example

SDK: Coffee0, Coffee1, Coffee2.

Requirements

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

See Also

ISpRecognizer | SAPI Interfaces

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.