Identifying Items in the Namespace
One of the operations that must be handled when extending the shell's namespace is the enumeration of items. The IShellFolder::EnumObjects method returns an enumerator object, IEnumIdList that will return a set of identifiers that identifies each item within a specific folder.Called a shell item IDList, it is an array of bytes that contains enough data to identify items by the parent folder. Only the first two bytes are defined (as the size of the ID) and the rest is opaque to the caller.
A shell item IDList must contain sufficient information to identify an object with a folder, but it may also contain additional information for efficient manipulation (such as retrieving display name or sorting). You have the option to store additional information because the Explorer does not compare two item IDs directly for either sorting or identification. Instead it uses IShellFolder::CompareID to perform this task.