The shell automatically unloads a DLL when the DLL's usage count is zero, but only after the DLL has not been used for a period of time. The inactive period may be unacceptably long at times, especially when a shell extension DLL is being debugged. You can shorten the inactive period by adding the following information to the registry.
HKLM
Software
Microsoft
Windows
CurrentVersion
Explorer
AlwaysUnloadDll
AlwaysUnloadDll shortens the inactive period so that DLLs are unloaded quickly.
While debugging your extension, you may want to shut down Windows without closing the currently running applications. To do so, follow these steps:
1.From the Start menu on the Windows taskbar, choose Shut Down.
2.While holding down the CTRL+ALT+SHIFT key combination, click the No button in the Shut Down Windows dialog box.