0 out of 5 rated this helpful - Rate this topic

IShellItem interface

Applies to: desktop apps only

Exposes methods that retrieve information about a Shell item. IShellItem and IShellItem2 are the preferred representations of items in any new code.

Members

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

Methods

The IShellItem interface has these methods.

MethodDescription
BindToHandler

Binds to a handler for an item as specified by the handler ID value (BHID).

Compare

Compares two IShellItem objects.

GetAttributes

Gets a requested set of attributes of the IShellItem object.

GetDisplayName

Gets the display name of the IShellItem object.

GetParent

Gets the parent of an IShellItem object.

 

Remarks

When to Implement

Third parties do not implement this interface; only use the implementation provided with the system.

Requirements

Minimum supported client

Windows XP with SP1

Minimum supported server

Windows Server 2003

Header

Shobjidl.h

DLL

Shell32.dll (version 6.0 or later)

See also

IShellItem2

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
OS version information and APIs for creating items
IShellItem is the preferred way to consume the shell data model for applications that operate on XP SP1 or above.

Applications are encouraged to use IShellItem and IShellItem2 instead of IShellFolder and IDLists as the way to reason about shell data.

Below is a list of other functions that construct shell items from other currency, see those for the minimum platform that they require.

SHCreateShellItem
SHCreateItemFromIDList
SHCreateItemFromParsingName
SHCreateItemWithParent
SHCreateItemFromRelativeName
SHCreateItemInKnownFolder
SHGetItemFromObject
CLSID_ShellItem implements marshal by value

A shell item represents an absolute IDList in the bound state; that is it holds the data source instance object and child IDlist as members to perform its work.

Shellitem also implements marshal by value to enable the efficient use of these objects as interchange currency between COM apartments.
the system provides the implementation of IShellItem via CLSID_ShellItem
applications or shell data sources do not create objects that impement IShellitem; instead the system provides this.

this object can be created using SHCreateItemFromIDList() and SHCreateItemFromParsingName() or CoCreate of CLSID_ShellItem.