Life and code.
RSS icon Home icon
  • Living 64-bit: Why Windows Thumbnails Show Up Randomly

    Posted on December 17th, 2009 Brian No comments

    Windows Explorer has had support for showing thumbnails instead of icons for many years now.  Support is built-in for many common formats, like images or rich text, but it doesn’t know how to deal with more complicated formats like PDFs and ODTs.  To compensate for this lack of support, there is an extension mechanism that third-party applications can use to teach Explorer how to render thumbnails. Then, whenever you create or modify a file, Explorer notices that it has changed, recreates the thumbnail, and saves it to a cache file.  This behavior is very evident if you save files on your desktop, since it is one Explorer window that is always visible.

    Unfortunately, in a 64-bit world, this approach often fails for the same reasons that Windows Search Filters often fail.  In 64-bit Windows, Explorer is a 64-bit process, but most third-party application programmers only provide 32-bit extension DLLs.  Since Explorer is unable to load the 32-bit DLLs, it cannot render the thumbnail – and you’re left with an ugly icon.  If you’re living 64-bit, though, you’ve no-doubt noticed that many of the thumbnails do get generated, but seemingly at random.  You might have a PDF sitting on your desktop for weeks, and suddenly one day it will switch from an ugly icon to a thumbnail.  What gives?

    The secret is that Explorer is not just a running process for viewing your files and folders.  It is exists in a series of libraries and common controls that third-party applications use to provide common functionality with a familiar interface.  For example, almost all “Save” and “Open” dialogs either use or extend the built-in Windows versions, and those Windows versions use the same libraries as Windows Explorer to hoist some of that familiar functionality into the applications.  In a very real sense, Explorer is being embedded in these third-party applications.

    But remember: These third-party applications are 32-bit.  That means that there are 32-bit versions of the Explorer libraries hanging around Windows, in case these applications need to use them.  So when a 32-bit application opens a “Save” dialog and you navigate to a folder, you’re essentially pointing a 32-bit version of Explorer at that folder.  Like usual, Explorer notices there are thumbnails that have not been generated, but now it can properly load the 32-bit third-party thumbnail extensions.  It renders the thumbnails and writes them out to the cache file.

    Surprise!  Thumbnails for a file you weren’t even working on have suddenly been updated.  It’s not random at all, but because you were working on a different file, it just seems random.

  • Living 64-bit: Search Filters for Windows

    Posted on November 19th, 2009 Brian No comments

    One of the greatest features in Windows Vista that carries forward to Windows 7 is the Windows Search-In-The-Start-Menu.  Just hit the Windows key and start typing, and voila! you are instantly graced with search results.  Suddenly desktop search is useful!

    Unfortunately, the utility of the search is greatly limited by whether or not an appropriate filter exists for a particular file type.  Windows ships with filters for various barebones formats, such as text files and web pages, as well as Microsoft Office documents (of course).  Though filters for some formats can be found on the web, normally it is the job of the installer to properly configure filters to handle the application’s file types.

    And herein lies the problem.

    You see, when you’re running a 64-bit OS, most application programs you have are actually running in 32-bit mode.  Why?  Well, from an end-user’s perspective of the application, there is usually no difference between 32-bit mode and 64-bit mode.  There are virtually no performance differences, no look-and-feel differences, and no functional differences.

    But from an application vendor’s perspective, 64-bit support requires often drastic API changes, as well as compiling, testing, and releasing a 64-bit version.  It’s a lot of work to support something that your customer probably won’t even notice, and that’s not to mention having to explain to a confused grandmother that she downloaded the 64-bit version for her 32-bit machine and could she please try again.  So for most application vendors, 64-bit is something only done when absolutely necessary, and thus most applications get released in 32-bit versions only.

    So back to search filters:  One of the gotchas of 64-bit is that you cannot load 32-bit libraries into a 64-bit process, and on a 64-bit machine, the Windows Indexing Engine is a 64-bit process.  Thus most 32-bit applications will be unable to properly install their search filters on 64-bit Windows unless they go out of their way to do so.  OpenOffice currently suffers from this problem, as does Adobe’s PDF Reader.

    Fortunately, it has been recognized as a problem, and applications are fixing it.  OpenOffice is supposed to have it fixed in version 3.2, and Adobe offers a free 64-bit version of their PDF filter.  And in the meantime, you can often find good filters for free on, or some for free and for sale on