Export (0) Print
Expand All

ISpRecoGrammar2::SetRulePriority (SAPI 5.3)

Speech API 5.3
Microsoft Speech API 5.3

ISpRecoGrammar2::SetRulePriority

ISpRecoGrammar2::SetRulePriority sets the priority on the specified rule.


HRESULT SetRulePriority(
   LPCWSTR    pszRuleName,
   ULONG      ulRuleId,
   int        nRulePriority
);

Parameters

pszRuleName
The name of the rule.
ulRuleId
The ID number of the rule.
nRulePriority
The priority to be assigned to the rule (between -128 and + 127). When a given utterance satisfies more than one rule, the recognizer applies the rule with the highest priority. When an utterance satisfies several rules with the same priority, or several rules with no priority, the recognizer applies the most recently activated rule.

Return values

ValueDescription
S_OKFunction completed successfully.
E_INVALIDARGOne of the parameters is invalid.
FAILED(hr)Appropriate error message.
Show:
© 2014 Microsoft