IParentAndItem interface (shobjidl_core.h)

Exposes methods that get and set the parent and the parent's child ID. While IParentAndItem is typically implemented on IShellItems, it is not specific to IShellItem.

Inheritance

The IParentAndItem interface inherits from the IUnknown interface. IParentAndItem also has these types of members:

Methods

The IParentAndItem interface has these methods.

 
IParentAndItem::GetParentAndItem

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

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

Remarks

The performance improvement using this interface can be noted in comparison with IPersistIDList, an interface that uses absolute item identifier lists. Subsequent operations on objects that implement IPersistIDList may require IShellFolder::BindToObject calls, and these calls may impact performance. In the case of IShellItems and participating IShellFolders that implement IParentAndItem, the parent IShellFolder may already be cached. By implementing IParentAndItem and then getting/setting the parent IShellFolder directly, the call to IShellFolder::BindToObject on the item identifier list to retrieve the IShellFolder interface is eliminated.

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)