ISpGrammarBuilder::AddRuleTransition adds a rule (reference) transition from one grammar rule to another.
HRESULT AddRuleTransition(
SPSTATEHANDLE hFromState,
SPSTATEHANDLE hToState,
SPSTATEHANDLE hRule,
float Weight,
const SPPROPERTYINFO *pPropInfo
);
hRule can also be one of the following special transition handles:
| Transition handle | Description |
|---|---|
| SPRULETRANS_WILDCARD | <WILDCARD> transition |
| SPRULETRANS_DICTATION | <DICTATION> single word from dictation |
| SPRULETRANS_TEXTBUFFER | <TEXTBUFFER> transition |
| Value | Description |
|---|---|
| S_OK | Function completed successfully. |
| E_INVALIDARG | At least one parameter is invalid. |
| E_OUTOFMEMORY | Not enough memory to complete operation. |
| FAILED(hr) | Appropriate error message. |