SHCreateShellItemArray function

Creates a Shell item array object.

Syntax

SHSTDAPI SHCreateShellItemArray(
  PCIDLIST_ABSOLUTE     pidlParent,
  IShellFolder          *psf,
  UINT                  cidl,
  PCUITEMID_CHILD_ARRAY ppidl,
  IShellItemArray       **ppsiItemArray
);

Parameters

pidlParent

Type: PCIDLIST_ABSOLUTE

The ID list of the parent folder of the items specified in ppidl. If psf is specified, this parameter can be NULL. If this pidlParent is not specified, it is computed from the psf parameter using IPersistFolder2.

psf

Type: IShellFolder*

The Shell data source object that is the parent of the child items specified in ppidl. If pidlParent is specified, this parameter can be NULL.

cidl

Type: UINT

The number of elements in the array specified by ppidl.

ppidl

Type: PCUITEMID_CHILD_ARRAY

The list of child item IDs for which the array is being created. This value can be NULL.

ppsiItemArray

Type: IShellItemArray**

When this function returns, contains the address of an IShellItemArray interface pointer.

Return Value

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

   
Windows version Windows Vista [desktop apps only] Windows Server 2008 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)
DLL Shell32.dll