IParentAndItem::SetParentAndItem method

Sets the parent of an item and the parent's child ID.

Syntax


HRESULT SetParentAndItem(
  [in] PCIDLIST_ABSOLUTE pidlParent,
  [in] IShellFolder      *psf,
  [in] PCUITEMID_CHILD   pidlChild
);

Parameters

pidlParent [in]

Type: PCIDLIST_ABSOLUTE

A pointer of the parent.

psf [in]

Type: IShellFolder*

A pointer to the IShellFolder that is the parent.

pidlChild [in]

Type: PCUITEMID_CHILD

A PIDL that is a child relative to psf.

Return value

Type: HRESULT

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

Remarks

While IParentAndItem is typically implemented on IShellItems, it is not specific to IShellItem.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

 

 

Show: