IFolderView2::GetSelection method (shobjidl_core.h)

Gets the current selection as an IShellItemArray.

Syntax

HRESULT GetSelection(
  [in]  BOOL            fNoneImpliesFolder,
  [out] IShellItemArray **ppsia
);

Parameters

[in] fNoneImpliesFolder

Type: BOOL

If TRUE, this method returns an IShellItemArray containing the parent folder when there is no current selection.

[out] ppsia

Type: IShellItemArray**

The address of a pointer to an IShellItemArray.

Return value

Type: HRESULT

Returns one of the following values, or an error otherwise.

Return code Description
S_OK
The operation completed successfully.
S_FALSE
The IShellItemArray returned has zero items.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)