Starting with the Windows Vista PlatformSDK, defining the symbol
STRICT_ before including shell header files changes declarations that previously had simply used
ITEMIDLIST now use one of various types which are more clear about what type of ID list is being used.
Think of it as the
STRICT macro for the shell.
The more precise names emphasize the form of the ID list:
ITEMID_represents an item ID relative to some implied shell folder. The item ID is followed by a null terminator and is therefore exactly one
SHITEMIDlong. In file-system speak, this is a "file name."
IDLIST_represents an item ID list relative to some implied shell folder. It can consist of any number of
SHITEMIDstructures concatenated together, followed by a null terminator. This item ID list must be used in conjunction with the
IShellFolderit is associated with. In file-system speak, this is a "relative path."
IDLIST_represents an item ID list relative to the desktop root folder. It too can be any length. This item ID list must be used in conjunction with the
SHGetDesktopFolder. In file-system speak, this is a "fully-qualified absolute path." (An absolute ID list is the special case of a relative ID list where the implied shell folder is the desktop root folder.)
ITEMID_represents an array of pointers to
ITEMID_objects, where all of the
ITEMID_objects are children of the same shell folder parent. The array must be used in conjunction with that parent shell folder.
These new types were introduced to help catch common programming errors when using the shell namespace. For example, if you try to pass an array of absolute pidls to
IShellFolder::, you will get a type mismatch compiler error because that method takes an
ITEMID_, and the thing you passed is not an array of
You are encouraged to turn on strict mode when compiling code that uses the shell namespace, but to preserve source code backward compatibility, the setting is off by default.