Share via


ISpSREngine::PrivateCall (SAPI 5.3)

Microsoft Speech API 5.3

ISpSREngine::PrivateCall

ISpSREngine::PrivateCall makes an engine-specific extension call to the SR engine. This method is called when the engine extension COM object calls _ISpPrivateEngineCall::CallEngine. SAPI marshals the data to the main engine object and calls this method.

  
    HRESULT PrivateCall(
   void    *pvEngineContext,
   PVOID   *pCallFrame,
   ULONG    ulCallFrameSize,
);

Parameters

  • pvEngineContext
    [in] Pointer to the engine's pointer for this context, as returned from a previous call to OnCreateRecoContext.
  • pCallFrame
    [in] Pointer to the engine-specific data. This can be used both to pass in and return data from the engine. The returned data must be the same size as the passed in data.
  • ulCallFrameSize
    [in] Size, in bytes, of the engine-specific data.

Return values

Value
S_OK
FAILED (hr)

Remarks

The engine must implement an engine-extension COM object and implement whatever interfaces the engine wants. Then an application can call QueryInterface for these interfaces on the recognition context object. The engine extension object can query for the _ISpPrivateEngineCall interface from the recognition context. If the engine must directly communicate with the main engine object, it can call the CallEngine method, which passes the data to this method. See the SR Engine Guide for more details on this process.