다음을 통해 공유


ISpSREngine::SetProprietaryRuleState (Windows CE 5.0)

Send Feedback

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.

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 Values

The following table shows the possible return values.

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

Requirements

OS Versions: Windows CE .NET 4.1 and later.
Header: Sapiddk.h, Sapiddk.idl.
Link Library: Sapilib.lib.

See Also

ISpSREngine | SAPI Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.