What are those little overlay icons?

Raymond Chen

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.

0 comments

Discussion is closed.

Feedback usabilla icon