ISpSREngineSite::SetRuleClientContext

Microsoft Speech SDK

The Microsoft.com Speech website Microsoft Speech SDK SAPI 5.1

ISpSREngineSite::SetRuleClientContext

ISpSREngineSite::SetRuleClientContext sets an engine-defined pointer on a CFG rule.

This allows an engine to associate a pointer to its own data with each rule. This can be quickly recovered with ISpSREngineSite::GetRuleInfo.

HRESULT SetRuleClientContext(
   SPRULEHANDLE   hRule,
   void          *pvClientContext
);

Parameters

hRule
[in] Handle of a rule.
pvClientContext
[in] Pointer to the engine's data it wishes to associate with this rule.

Return values

Value Description
S_OK Function completed successfully.
SPERR_INVALID_HANDLE Invalid rule handle parameter.
FAILED (hr) Other appropriate error message.