ISpEventSource::GetEvents (Windows CE 5.0)
This method gets events from the event queue and then removes them from the queue. The events not retrieved 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 retrieved. This can be the result of subsequent Notify calls. Clients will want to use the helper class CSpEvent to manipulate events retrieved through calls to GetEvents.
HRESULT GetEvents( ULONG ulCount, SPEVENT* pEventArray, ULONG* pulFetched);
Parameters
- ulCount
[in] Maximum number of events that SPEVENT structures can contain. - pEventArray
[out] Pointer to array of SPEVENT structures. Each retrieved event is written to one of these structures. - pulFetched
[out] Pointer to the number of events retrieved. This number represents the earliest events in the queue. If ulCount is one, this parameter is not required.
Return Values
The following table shows the possible return values.
Value | Description |
---|---|
S_OK | Function completed successfully and all requested events were retrieved. |
S_FALSE | Success, but fewer than the requested amount of events were retrieved. |
E_POINTER | pEventArray is invalid. |
FAILED(hr) | Appropriate error message. |
Requirements
OS Versions: Windows CE .NET 4.1 and later.
Header: Sapi.h, Sapi.idl.
Link Library: Sapilib.lib.
See Also
ISpEventSource | SAPI Interfaces
Send Feedback on this topic to the authors