ISpSREngineSite::AddEvent (SAPI 5.3)
Speech API 5.3
ISpSREngineSite::AddEvent sends an event back from the engine to applications.
For more details on this method and the different events that can be fired, see the SR Engine Guide.
HRESULT AddEvent( const SPEVENT *pEvent, SPRECOCONTEXTHANDLE hContext );
- [in] Address of the SPEVENT structure containing the event information.
- [in] The RecoContext is the event handle passed to SR engine from SAPI through ISpSREngine::OnCreateRecoContext. This value should normally be set to NULL indicating the event is a global one.
|S_OK||Function completed successfully.|
|E_INVALIDARG||At least one of pEvent or hContext is invalid or bad. Alternatively, it indicates that an event is being added to an inappropriate mode.|
|SPERR_STREAM_POS_INVALID||The current audio stream offset is greater than either the current seek position or the last sync position. Alternatively, if the event stream is not initialized, the stream position is not zero.|
|FAILED(hr)||Appropriate error message.|