Export (0) Print
Expand All

ISpEventSource::GetEvents (SAPI 5.4)

Speech API 5.4
Microsoft Speech API 5.4

ISpEventSource::GetEvents

ISpEventSource::GetEvents retrieves and removes the queued events. Clients will want to use the helper class CSpEvent to retrieve and manipulate these events.


HRESULT GetEvents(
   ULONG     ulCount,
   SPEVENT  *pEventArray,
   ULONG    *pulFetched
);

Parameters

ulCount
[in] Maximum number of events that SPEVENT structures can return.
pEventArray
[out] Pointer to array of SPEVENT structures. Each returned event is written to one of these SPEVENT structures.
pulFetched
[out] Pointer to the number of events returned. If ulCount is one, this parameter is not required.

The events are then removed from the queue. The events not returned are left for a future call to GetEvents. It is possible that by the time an application calls GetEvents, another thread has processed the events and there are no events to be returned. This may be the result of subsequent Notify calls.

Return values

ValueDescription
S_OKFunction completed successfully and all requested events were returned.
S_FALSESuccess, but less than the requested amount of events were returned.
E_POINTERpEventArray is invalid.
FAILED(hr)Appropriate error message.
Show:
© 2014 Microsoft