Export (0) Print
Expand All

ISpSREngineSite::AddEvent (SAPI 5.3)

Speech API 5.3
Microsoft Speech API 5.3

ISpSREngineSite::AddEvent

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
);

Parameters

pEvent
[in] Address of the SPEVENT structure containing the event information.
hContext
[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.

Return values

ValueDescription
S_OKFunction completed successfully.
E_INVALIDARGAt least one of pEvent or hContext is invalid or bad. Alternatively, it indicates that an event is being added to an inappropriate mode.
E_POINTERInvalid pointer.
SPERR_STREAM_POS_INVALIDThe 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.
Show:
© 2014 Microsoft