Export (0) Print
Expand All

ISpGrammarBuilder::Commit (SAPI 5.3)

Speech API 5.3
Microsoft Speech API 5.3

ISpGrammarBuilder::Commit

ISpGrammarBuilder::Commit performs consistency checks of the grammar structure, creates the serialized format, saves the grammar structure, or reloads the grammar structure.

The grammar structure may be saved it to the stream provided by SetSaveObjects, or reloaded into the SR engine. Commit must be called before any changes to the grammar can take effect.


HRESULT Commit(
   DWORD   dwReserved
);

Parameters

dwReserved
Reserved. Must be zero.

Return values

ValueDescription
S_OKFunction completed successfully.
E_INVALIDARGdwReserved is not zero.
SPERR_UNINITIALIZEDStream not initialized.  Call SetSaveObjects before Commit.
SPERR_NO_RULESA grammar must have at least one rule and one word.
SPERR_NO_TERMINATING_RULE_PATHAt least one rule is not empty but has no terminating path (path of transitions from the initial state to a NULL state).
SPERR_CIRCULAR_RULE_REFAt least one rule has left recursion (a direct or indirect rule reference to itself originated from the initial state).
SPERR_STATE_WITH_NO_ARCSAt least one rule has a node with no outgoing transitions.
SPERR_EXPORT_DYNAMIC_RULEDynamic rules or rules referencing dynamic rules (directly or indirectly) cannot be exported.

 

Show:
© 2014 Microsoft