Share via


ISpSREngine::SetPropertyString

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

This method sets a property string for the SR engine. SAPI calls this method when an application sets the associated recognition context object that implements ISpRecoContext. If this method returns S_OK, indicating that it supports the property string and has changed its value, SAPI sends an SPEI_PROPERTY_STRING_CHANGE event to all speech recognition contexts to inform them of the change.

Syntax

HRESULT SetPropertyString(
  SPPROPSRC eSrc,
  void* pvSrcObj,
  const WCHAR* pName,
  const WCHAR* pValue
);

Parameters

  • eSrc
    [in] A property source. Possible values are defined for the SPPROPSRC enumeration. Currently the only supported value is SPPROPSRC_RECO_INST.
  • pvSrcObj
    [in] Pointer to additional information. Currently this value is always NULL.
  • pName
    [in] Pointer to the property string name.
  • pValue
    [in] Pointer to the value to set for the property string.

Return Value

The following table shows the possible return values.

Value Description

S_OK

Function completed successfully. Engine supports this property and has set it to the requested value.

S_FALSE

Function completed successfully but engine does not support this property.

FAILED(hr)

Appropriate error message.

Remarks

Applications can set and get properties to control run-time results of the SR engine. Some values are predefined by SAPI and others can be added by an engine. See also ISpSREngine::GetPropertyString.

Requirements

Header sapiddk.h, sapiddk.idl
Library sapilib.lib
Windows Embedded CE Windows CE .NET 4.1 and later

See Also

Reference

ISpSREngine
SAPI Interfaces