ISpSREngine::OnCreateGrammar (SAPI 5.4)
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 );
- [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.
- [in] Unique handle to the grammar.
- [out] The engine should set the contents of this to an arbitrary pointer containing any information the engine has associated with this grammar.
|S_OK||Function completed successfully.|
|FAILED(hr)||Appropriate error message.|