ISpSREngine::SetPropertyString (SAPI 5.4)

Microsoft Speech API 5.4


ISpSREngine::SetPropertyString sets a string property value on the SR engine. 

    HRESULT SetPropertyString(SPPROPSRC      eSrc,
   void          *pvSrcObj,
   LPCWSTR       *pName,
   LPCWSTR       *pValue


  • eSrc
    [in] One of the types specified in the SPPROPSRC enumeration sequence. (This will currently always be SPPROPSRC_RECO_INST).
  • pvSrcObj
    [in] Pointer to additional information. (Currently always NULL).
  • pName
    [in] String containing the property name.
  • pValue
    [in] String value that the property should be set to.

Return values



Applications can use properties to control run-time results of the SR engine. The application can set and get values for specific attributes on the engine. Some values are predefined by SAPI and others may be added by an engine. See SAPI 5.0 SR Properties White Paper for more details.

This method is called on the engine by SAPI when the application calls ISpProperties::SetPropertyString on its recognition context object. If the engine returns S_OK from this method, indicating that it supports this property and has changed the value for it, SAPI will send an SPEI_PROPERTY_STRING_CHANGE event to all contexts to inform them of this change.