Article ID: 164501 - View products that this article applies to.
This article was previously published under Q164501
IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/256986/EN-US/ )Description of the Microsoft Windows Registry
Microsoft Windows NT, Windows 2000, and Windows XP uses the KnownDLLs registry entries to search for either 32-bit or 16-bit DLLs when loading the DLL. For 32-bit DLLs the KnownDLLs registry entry only affects the search for implicitly loaded DLLs. For 16-bit DLLs the KnownDLLs registry entry affects the search for both implicitly and explicitly loaded DLLs. If you incorrectly include a DLL name in the KnownDLLs registry entry, the LoadLibrary in Windows NT/2000/XP WOW fails to load a DLL located in the application's current directory.
Windows NT/2000/XP uses the KnownDLLs registry entry to determine which DLL an application will use. There are two different KnownDLLs registry entries: one that affects the loading of 32-bit DLLs, and one that affects the loading of 16-bit DLLs. A DLL listed in the KnownDLLs registry entry is sometimes referred to as a "KnownDLL" in this article.
DLLs: 16-bitFor 16-bit DLLs, the KnownDLLs registry value is found in the following key:
The KnownDLLs registry value is a REG_SZ string with DLL names in 8.3 format, separated by a space. The KnownDLLs value affects both implicitly and explicitly loaded DLLs.
Without the KnownDLLs registry value, Windows NT WOW uses the following search order to locate the DLL:
If Windows NT/2000/XP WOW fails to locate the DLL, LoadLibrary returns error code 2 (File Not Found), or the implicit linking causes the parent module to fail to load.
For information about how Windows 95 registers 16-Bit DLLs as KnownDLLs see the following article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/141969/EN-US/ )Windows 95 Uses Known16DLLs Registry Key to Find 16-bit DLLs
DLLs: 32-bitFor 32-bit DLLs the KnownDLLs registry key is found at:
The REG_SZ registry value name is the name of the DLL without the extension. The registry value data is the name of the DLL with the extension. This entry affects only implicitly loaded DLLs, not DLLs loaded using the LoadLibrary() API.
Without this entry, Windows NT uses the following search order to locate the DLL:
A DLL is treated as a KnownDLL if a KnownDLL implicitly links to it. For example, MAIN.DLL uses functions from CHILD.DLL. If MAIN.DLL is listed in the KnownDLLs registry key, then Windows NT also treats CHILD.DLL as a KnownDLL. Another application or DLL that uses CHILD.DLL will use the DLL that was linked to MAIN.DLL.
Windows NT maps 32-bit KnownDLLs at boot time. Renaming or moving the DLL does not have any effect on which DLL an application will load; it still uses the one that was in \WINNT\SYSTEM32 at boot time.
To alter how Windows NT loads KnownDLLs use the ExcludeFromKnownDlls registry value located at:
NOTE: Use RegEdt32 instead of RegEdit to modify this registry value.
This REG_MULTI_SZ registry value contains names of DLLs in 8.3 format, one DLL per string. If a DLL is listed in ExcludeFromKnownDlls, then Windows NT does not treat the DLL as a KnownDLL, even if it is listed in the KnownDLLs registry key. This is useful when you develop a DLL that is used by a lot of other KnownDLLs and it is important to replace and test new builds without rebooting Windows NT.
Making changes to the aforementioned registry keys requires administrative privileges to the local machine. The use of KnownDLLs secures the system from someone deceptively replacing APIs by placing a rogue DLL in the application directory.
For information about how Windows 95 registers 32-Bit DLLs as KnownDLLs see the following article in the Microsoft Knowledge Base:
151646WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.
(http://support.microsoft.com/kb/151646/EN-US/ )Windows 95 Uses KnownDLLs Registry Key to Find 32-bit DLLs
For information about how to edit the registry, view the "Changing Keys And Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD).
Article ID: 164501 - Last Review: November 21, 2006 - Revision: 4.1
Contact us for more help