IShellFolderView::RemoveObject method (shlobj_core.h)

[RemoveObject is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]

Removes an item from the view.

Syntax

HRESULT RemoveObject(
  [in, optional] PUITEMID_CHILD pidl,
  [out]          UINT           *puItem
);

Parameters

[in, optional] pidl

Type: PUITEMID_CHILD

A pointer to the item to remove from the view. This value can be NULL. When using the system folder view object (DefView) under Windows XP and Windows Vista, a NULL value results in the removal of all objects from the view.

[out] puItem

Type: UINT*

When this method returns, contains a pointer to the index position of the removed item.

Return value

Type: HRESULT

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

Remarks

Items removed through this method can be readded to the view by the data source at any time.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shlobj_core.h