Share via


Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

Microsoft Speech Platform

ISpRecoGrammar::GetGrammarId

ISpRecoGrammar::GetGrammarId retrieves the identifier associated with the grammar when the grammar was created.

The grammar ID is set by the application by calling ISpRecoContext::CreateGrammar.

<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>HRESULT GetGrammarId(</strong> <strong> ULONGLONG</strong> *<em>pullGrammarId</em> <strong>);</strong> </pre>

Parameters

  • pullGrammarId
    [out] Address of a ULONGLONG variable to receive the grammar ID.

Return Values

Value Description
S_OK Function completed successfully.
E_POINTER pullGrammarId is invalid or bad.

Remarks

The grammar ID will be set in the SPPHRASE object when a recognition is sent to the application (see ISpPhrase::GetPhrase).