August 27th, 2003

What are those little overlay icons?

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.

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.