IParentAndItem::GetParentAndItem method (shobjidl_core.h)

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

Syntax

HRESULT GetParentAndItem(
  [out, optional] PIDLIST_ABSOLUTE *ppidlParent,
  [out, optional] IShellFolder     **ppsf,
  [out, optional] PITEMID_CHILD    *ppidlChild
);

Parameters

[out, optional] ppidlParent

Type: PIDLIST_ABSOLUTE*

When this method returns, contains the address of a PIDL that specifies the parent.

[out, optional] ppsf

Type: IShellFolder**

When this method returns, contains the address of a pointer to the IShellFolder that is the parent.

[out, optional] ppidlChild

Type: PITEMID_CHILD*

When this method returns, contains the address of a child PIDL that identifies the IParentAndItem object relative to that specified by ppsf.

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

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)