ISpEventSource::GetEvents

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

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.

Syntax

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 Value

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

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

See Also

Reference

ISpEventSource
SAPI Interfaces