ISpSREngine::SetProprietaryRuleIdState

Microsoft Speech SDK

The Microsoft.com Speech website Microsoft Speech SDK SAPI 5.1

ISpSREngine::SetProprietaryRuleIdState

ISpSREngine::SetProprietaryRuleIdState sets the proprietary grammar rule ID state. This is used to activate or deactivate rules in non-standard proprietary grammars where each rule is identified by an ID. 

HRESULT SetProprietaryRuleIdState(
   void         *pvEngineGrammar, 
   DWORD         dwRuleId,
   SPRULESTATE   NewState
);

Parameters

pvEngineGrammar
[in] The engine's grammar pointer for this grammar, as returned from a previous call to the OnCreateGrammar method.
dwRuleId
[in] The engine proprietary grammar rule identifier.
NewState
[in] One of the grammar rule states specified in the SPRULESTATE enumeration sequence.

Return values

Value Description
S_OK Function completed successfully.
FAILED(hr) Appropriate error message.