A. Windows caches Windows Explorer and shell-extention .dll files to save disk I/O. However, even after you close the calling program, the.dll file remains cached. To stop Windows from caching .dll files after you've closed the calling program, perform the following steps:
- Start a registry editor (e.g., regedit.exe).
- Navigate to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer registry subkey.
- From the Edit menu, select New, DWORD Value.
- Enter the name AlwaysUnloadDLL, then press Enter.
- Double-click the new value, set it to 1, then click OK.
- Close the registry editor, then reboot the machine for the change to take effect.
A shell-extension .dll is one that provides a shell-namespace extension or menu extension (e.g., WinZip's extension .dll lets you easily compress folders from a context menu item in Windows Explorer). By default, Windows Explorer loads shell-extension .dll files and keeps them loaded, even when they aren't being directly accessed (e.g., the namespace they provide isn't being used and no menus are active). Note that Windows Explorer is an active application and uses .dll files. The registry value simply has Windows Explorer unload these .dll files when not in use, which is useful for developers of such .dll files who want to test, fix, and retest their .dll files without having to restart Windows Explorer. Thanks to Mark Russinovich for his help with this FAQ.