Item Identifiers and Identifier Lists
The shell uses object identifiers within the shell namespace. All of the objects that are visible in the shell (files, directories, servers, workgroups, and so on) have an identifier that is unique among the objects within the parent folder. These identifiers are called item identifiers, and they have the SHITEMID data type as defined in the SHLOBJ.H header file. An item identifier is a variable-length byte stream that contains information for identifying an object within a folder. Only the creator of an item identifier knows the content and format of the identifier. The only part of an item identifier that the shell uses is the first two bytes, which specify the size of the identifier.
Each parent folder has its own item identifier that identifies it within its own parent folder. Thus, any shell object can be uniquely identified by a list of item identifiers. A parent folder keeps a list of identifiers for the items in the folder. The list has the ITEMIDLIST data type. Item identifier lists are allocated by the shell and may be passed across shell interfaces, such as IShellFolder. It is important to remember that each identifier in an item identifier list is only meaningful within the context of the parent folder.
An application can set a shortcut's item identifier list by using the IShellLink::SetIDList member function. This function is useful when setting a shortcut to an object that is not a file, such as a printer or disk drive. An application can retrieve a shortcut's item identifier list by using the IShellLink::GetIDList member function.