ISpSREngine::OnCreateGrammar (SAPI 5.3)
Microsoft Speech API 5.3
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
Value |
S_OK |
FAILED(hr) |