SHCreateShellItemArrayFromShellItem function

Creates an array of one element from a single Shell item.

Syntax

SHSTDAPI SHCreateShellItemArrayFromShellItem(
  IShellItem *psi,
  REFIID     riid,
  void       **ppv
);

Parameters

psi

Type: IShellItem*

Pointer to IShellItem object that represents the item.

riid

Type: REFIID

A reference to the IID of the interface to retrieve through ppv, typically IID_IShellItemArray.

ppv

Type: void**

When this method returns, contains the interface pointer requested in riid. This is typically a pointer to an IShellItemArray.

Return Value

Type: HRESULT

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

Remarks

This function creates a one-element array from a single item. To create an array from the contents of a folder, use SHCreateShellItemArray.

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