ISpSREngine::SetProprietaryRuleState (SAPI 5.3)
ISpSREngine::SetProprietaryRuleState sets the proprietary grammar rule state. This is used to activate or deactivate rules in non-standard proprietary grammars, where each rule is identified by a string name.
HRESULT SetProprietaryRuleState( void *pvEngineGrammar, LPCWSTR *pszName, void *pReserved, SPRULESTATE NewState, ULONG *pcRulesChanged );
- [in] The engine's grammar pointer for this grammar, as returned from a previous call to the OnCreateGrammar method.
- [in, string] Null-terminated string that contains the grammar rule name, or NULL to indicate all top-level rules should be activated in this grammar.
- Reserved for future use.
- [in] One of the grammar rule states specified in the SPRULESTATE enumeration sequence.
- [out] The number of rules whose state has been changed. This should be set to 1 if a specific rule name was supplied.
|S_OK||Function completed successfully.|
|FAILED(hr)||Appropriate error message.|
If ::SetProprietaryRuleState is called with the rule name set to NULL, the engine should activate or deactivate all top-level rules in this grammar. The pcRulesChanged parameter must be set to the number of rules whose state has changed.