ISpSREngine::SetProprietaryRuleState (Windows Embedded CE 6.0)
1/6/2010
This method sets the state of a proprietary grammar rule. The method is used to start or stop rules in nonstandard proprietary grammars, for which each rule is identified by a string name.
If this method is called with the rule name set to NULL, the engine should start or stop all top-level rules in the grammar. The pcRulesChanged parameter must be set to the number of rules for which the state has changed.
Syntax
HRESULT SetProprietaryRuleState(
void* pvEngineGrammar,
const WCHAR* pszName,
const WCHAR* pszValue,
SPRULESTATE NewState,
ULONG* pcRulesChanged
);
Parameters
- pvEngineGrammar
[in] Pointer to the grammar for the engine, as retrieved from a prior call to the ISpSREngine::OnCreateGrammar method.
- pszName
[in] Pointer to the grammar rule name, or NULL. Set this value to NULL to indicate that all top-level rules in the grammar should be activated.
- pszValue
[in] Pointer to rule information. Currently this value is always NULL.
- NewState
[in] A grammar rule state. Possible values are defined for the SPRULESTATE enumeration.
- pcRulesChanged
[out] Pointer to the number of rules for which the state has been changed. The method writes a value of 1 if a specific rule name was supplied in the call.
Return Value
The following table shows the possible return values.
Value | Description |
---|---|
S_OK |
Function completed successfully. |
FAILED(hr) |
Appropriate error message. |
Requirements
Header | sapiddk.h, sapiddk.idl |
Library | sapilib.lib |
Windows Embedded CE | Windows CE .NET 4.1 and later |