{"id":5453,"date":"2013-01-24T07:00:00","date_gmt":"2013-01-24T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2013\/01\/24\/strict_typed_itemids-is-the-shell-namespace-version-of-the-strict-macro-used-by-user-and-gdi\/"},"modified":"2013-01-24T07:00:00","modified_gmt":"2013-01-24T07:00:00","slug":"strict_typed_itemids-is-the-shell-namespace-version-of-the-strict-macro-used-by-user-and-gdi","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20130124-00\/?p=5453","title":{"rendered":"STRICT_TYPED_ITEMIDS is the shell namespace version of the STRICT macro used by USER and GDI"},"content":{"rendered":"<p>Starting with the Windows Vista PlatformSDK, defining the symbol <code>STRICT_TYPED_ITEM&shy;IDS<\/code> before including shell header files changes declarations that previously had simply used <code>ITEM&shy;ID&shy;LIST<\/code> now use <a href=\"http:\/\/msdn.microsoft.com\/library\/bb773321\"> one of various types which are more clear about what type of ID list is being used<\/a>.<\/p>\n<p> Think of it as the <code>STRICT<\/code> macro for the shell. <\/p>\n<p> The more precise names emphasize the form of the ID list: <\/p>\n<ul>\n<li><code>ITEM&shy;ID_CHILD<\/code> represents an item ID     relative to some implied shell folder.     The item ID is followed by a null terminator     and is therefore exactly one <code>SH&shy;ITEM&shy;ID<\/code> long.     In file-system speak, this is a &#8220;file name.&#8221; <\/li>\n<li><code>ID&shy;LIST_RELATIVE<\/code> represents     an item ID list relative to some implied shell folder.     It can consist of any number of     <code>SH&shy;ITEM&shy;ID<\/code> structures concatenated     together, followed by a null terminator.     This item ID list must be used in conjunction with the     <code>IShell&shy;Folder<\/code> it is associated with.     In file-system speak, this is a &#8220;relative path.&#8221; <\/li>\n<li><code>ID&shy;LIST_ABSOLUTE<\/code> 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     <code>IShell&shy;Folder<\/code> returned by     <code>SH&shy;Get&shy;Desktop&shy;Folder<\/code>.     In file-system speak, this is a &#8220;fully-qualified absolute path.&#8221;     (An absolute ID list is the special case of a relative     ID list where the implied shell folder is the desktop root folder.) <\/li>\n<li><code>ITEM&shy;ID_CHILD_ARRAY<\/code> represents     an array of pointers to <code>ITEM&shy;ID_CHILD<\/code>     objects, where all of the <code>ITEM&shy;ID_CHILD<\/code>     objects are children of the same shell folder parent.     The array must be used in conjunction with that parent shell folder. <\/li>\n<\/ul>\n<p> 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 <code>IShell&shy;Folder::Get&shy;UI&shy;Object&shy;Of<\/code>, you will get a type mismatch compiler error because that method takes an <code>ITEM&shy;ID_CHILD_ARRAY<\/code>, and the thing you passed is not an array of <code>ITEM&shy;ID_CHLD<\/code> pointers. <\/p>\n<p> You are encouraged to turn on <i>strict mode<\/i> when compiling code that uses the shell namespace, but to preserve source code backward compatibility, the setting is off by default. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Starting with the Windows Vista PlatformSDK, defining the symbol STRICT_TYPED_ITEM&shy;IDS before including shell header files changes declarations that previously had simply used ITEM&shy;ID&shy;LIST 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 [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-5453","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>Starting with the Windows Vista PlatformSDK, defining the symbol STRICT_TYPED_ITEM&shy;IDS before including shell header files changes declarations that previously had simply used ITEM&shy;ID&shy;LIST 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 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/5453","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=5453"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/5453\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=5453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=5453"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=5453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}