What are those little overlay icons?

Date:August 27, 2003 / year-entry #34
Tags:code;tipssupport
Orig Link:https://blogs.msdn.microsoft.com/oldnewthing/20030827-00/?p=42783
Comments:    3
Summary:Windows XP ships with a number of icon overlays. A small arrow. Everybody knows this one: It's the shortcut overlay. A hand, palm up. This is the "sharing" overlay. A folder with this overlay is the root of a file share. A downward-pointing blue arrow. This is the "to be written to CD" overlay. A...

Windows XP ships with a number of icon overlays.

  • A small arrow. Everybody knows this one: It's the shortcut overlay.
  • A hand, palm up. This is the "sharing" overlay. A folder with this overlay is the root of a file share.
  • A downward-pointing blue arrow. This is the "to be written to CD" overlay.
  • A pair of blue swirling arrows. This sometimes baffles people. This means that the item is available offline. (You have to enable offline folders to get this.)
  • A black clock. This really baffles people. This means that the file has been archived to tape and will take a very long time to access.

The black clock is particularly baffling because you sometimes see it even if your system is not equipped with Hierarchical Storage Management. When this happens, it's because some program (typically a setup program) didn't check error codes properly.

CopyFileAttributes(LPCTSTR pszSrc, LPTSTR pszDst)
{
    SetFileAttributes(pszDst, GetFileAttributes(pszSrc));
}

The above code fragment fails to check for an error code from GetFileAttributes. It so happens that GetFileAttributes fails by returning the value 0xFFFFFFFF. If you fail to check this error code, you end up setting every possible attribute on the destination, including FILE_ATTRIBUTE_OFFLINE. FILE_ATTRIBUTE_OFFLINE is the flag that tells Explorer that the file has been archived to tape.


Comments (3)
  1. colin says:

    If this happens… how do you fix it?

  2. Things you ought to do though you may not personally benefit from it.

  3. I read Raymond Chen’s post entitled How do you convince developers to pay their "taxes"? with interest….

Comments are closed.


*DISCLAIMER: I DO NOT OWN THIS CONTENT. If you are the owner and would like it removed, please contact me. The content herein is an archived reproduction of entries from Raymond Chen's "Old New Thing" Blog (most recent link is here). It may have slight formatting modifications for consistency and to improve readability.

WHY DID I DUPLICATE THIS CONTENT HERE? Let me first say this site has never had anything to sell and has never shown ads of any kind. I have nothing monetarily to gain by duplicating content here. Because I had made my own local copy of this content throughout the years, for ease of using tools like grep, I decided to put it online after I discovered some of the original content previously and publicly available, had disappeared approximately early to mid 2019. At the same time, I present the content in an easily accessible theme-agnostic way.

The information provided by Raymond's blog is, for all practical purposes, more authoritative on Windows Development than Microsoft's own MSDN documentation and should be considered supplemental reading to that documentation. The wealth of missing details provided by this blog that Microsoft could not or did not document about Windows over the years is vital enough, many would agree an online "backup" of these details is a necessary endeavor. Specifics include:

<-- Back to Old New Thing Archive Index