IEnumShellItems::Next method

Gets an array of one or more IShellItem interfaces from the enumeration.

Syntax


HRESULT Next(
  [in]  ULONG      celt,
  [out] IShellItem **rgelt,
  [out] ULONG      *pceltFetched
);

Parameters

celt [in]

Type: ULONG

The number of elements in the array referenced by the rgelt parameter.

rgelt [out]

Type: IShellItem**

The address of an array of pointers to IShellItem interfaces that receive the enumerated item or items. The calling application is responsible for freeing the IShellItem interfaces by calling the IUnknown::Release method.

pceltFetched [out]

Type: ULONG*

A pointer to a value that receives the number of IShellItem interfaces successfully retrieved. The count can be smaller than the value specified in the celt parameter. This parameter can be NULL on entry only if celt is one, because in that case the method can only retrieve one item and return S_OK, or zero items and return S_FALSE.

Return value

Type: HRESULT

This method can return one of these values.

Return codeDescription
S_OK

if at least IShellItem interface was retrieved.

S_FALSE

if there are no more IShellItem interfaces in the enumeration.

Returns an error value if the function fails for any other reason.

 

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

See also

IEnumShellItems
IShellItem

 

 

Show: