Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
::OnCreateGrammar

ISpSREngine::OnCreateGrammar (SAPI 5.4)

Speech API 5.4
Microsoft Speech API 5.4

ISpSREngine::OnCreateGrammar

ISpSREngine::OnCreateGrammar informs the engine that a new grammar has been created. Each grammar belongs to a recognition context and can contain dictation, CFG, or proprietary grammar information. The engine can associate a pointer with each grammar that is then passed back to the engine in other methods using this grammar.

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

Parameters

pvEngineRecoContext
[in] The engine's recognition context pointer indicating the context this grammar belongs to. This is the value that the engine passes back to SAPI in the OnCreateRecoContext method.
hSAPIGrammar
[in] Unique handle to the grammar.
ppvEngineGrammar
[out] The engine should set the contents of this to an arbitrary pointer containing any information the engine has associated with this grammar. 

Return values

ValueDescription
S_OKFunction completed successfully.
FAILED(hr)Appropriate error message.
Show:
© 2015 Microsoft