IEnumEventObject::Next method (eventsys.h)

Retrieves the specified number of items in the enumeration sequence.

Syntax

HRESULT Next(
  [in]  ULONG    cReqElem,
  [out] IUnknown **ppInterface,
  [out] ULONG    *cRetElem
);

Parameters

[in] cReqElem

The number of elements being requested. If there are fewer than the requested number of elements left in the sequence, this method obtains the remaining elements.

[out] ppInterface

The address to a pointer to the IUnknown interface on the first object obtained. This parameter cannot be NULL.

[out] cRetElem

The number of elements actually obtained. This parameter cannot be NULL.

Return value

This method can return the standard return values E_INVALIDARG, E_POINTER, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following values.

Return code Description
S_OK
All elements requested were obtained.
S_FALSE
Not all elements requested were obtained. The number of elements obtained was written to pcRetElem.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header eventsys.h

See also

IEnumEventObject