ISpSREngineSite::AddEvent (Windows Embedded CE 6.0)

1/6/2010

This method adds an event to the SR engine site.

Syntax

HRESULT AddEvent(
  const SPEVENT* pEvent,
  SPRECOCONTEXTHANDLE hContext
);

Parameters

  • pEvent
    [in] Pointer to an SPEVENT structure defining the event.
  • hContext
    [in] Handle to the speech recognition context passed to the SR engine through ISpSREngine::OnCreateRecoContext. This context is typically set to NULL to indicate a global event.

Return Value

The following table shows the possible return values.

Value Description

S_OK

Function completed successfully.

E_INVALIDARG

At least one of pEvent or hContext is invalid or bad. Alternatively, this value indicates that an event is being added to an inappropriate mode.

E_POINTER

Invalid pointer.

SPERR_STREAM_POS_INVALID

The current audio stream offset is more 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.

Requirements

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

See Also

Reference

ISpSREngineSite
SAPI Interfaces