Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This method attempts to advance to the next item in the enumeration sequence.

Syntax

HRESULT Next(
  unsigned long 
celt,
  HREPLITEM* 
phItem,
  unsigned long FAR* 
pCeltFetched
);

Parameters

celt

[in] Specifies the number of elements to return. If the number of elements requested is more than remains in the sequence, only the remaining elements are returned. The number of elements returned is passed through the pCeltFetchedparameter, unless it is NULL.

phItem

[out] Pointer to the handle to the structure in which to return the elements.

pCeltFetched

[out] Pointer to the number of elements actually returned in * phItem.The pCeltFetchedparameter cannot be NULL if celtis greater than one. Likewise, if pCeltFetchedis NULL, celtmust be one.

Return Value

The following table shows the possible return values for this method.

Value Description

S_OK

Returned the requested number of elements; phItemis set if non-NULL. All requested entries are valid.

S_FALSE

Returned fewer elements than requested in celt.In this case, unused slots in the enumeration are notset to NULL and *phItemholds the number of valid entries, even if zero is returned.

E_OUTOFMEMORY

Out of memory.

E_INVALIDARG

The value of celtis invalid.

E_UNEXPECTED

An unexpected error occurred.

Requirements

Header cesync.h
Library coredll.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later