Compartir a través de


ISpSREngine::OnCreateGrammar (Windows CE 5.0)

Send Feedback

This method informs the SR engine of the creation of a new speech recognition grammar. Each grammar can contain dictation, CFG, or proprietary grammar information, and belongs to a specific speech recognition context (ISpRecoContext).

This method associates a pointer with the new grammar. SAPI passes this pointer when calling other methods for the grammar.

HRESULT OnCreateGrammar(  void* pvEngineRecoContext,  SPGRAMMARHANDLE hSAPIGrammar,  void** ppvEngineGrammar);

Parameters

  • pvEngineRecoContext
    [in] Pointer to the speech recognition context to which the grammar belongs. The pointer is retrieved by a prior call to the ISpSREngine::OnCreateRecoContext method.
  • hSAPIGrammar
    [in] Unique handle to the grammar.
  • ppvEngineGrammar
    [out] Address of an arbitrary pointer to information that the engine has associated with the grammar.

Return Values

The following table shows the possible return values.

Value Description
S_OK Function completed successfully.
FAILED(hr) Appropriate error message.

Requirements

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

See Also

ISpSREngine | SAPI Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.