IVCmdEnum::Next

This method retrieves the specified number of items in the enumeration sequence.

Syntax

HRESULT IEnumX::Next( ULONG celt, Unknown **rgelt, ULONG *pceltFetched);

Parameters

celt
[in] Number of elements to retrieve. If the number of elements requested is more than remains in the sequence, only the remaining elements are retrieved.
rgelt
[out] Array that receives the elements. If an error value is returned, no entries in the array are valid.
pceltFetched
[out] Pointer to a variable that receives the number of array elements actually copied to the array. This parameter cannot be NULL if celt is greater than one. If this parameter is NULL, celt must be one.

Return Values

NOERROR
The method successfully retrieved the specified number of items in the enumeration sequence.
E_INVALIDARG
The argument is invalid.
E_OUTOFMEMORY
The system is out of memory.
E_UNEXPECTED
An unexpected error occurred.
S_FALSE
The method did not retrieve the specified number of items in the enumeration sequence.
S_OK
The method successfully retrieved the specified number of items in the enumeration sequence.