PRB: Known16dlls Key Entry Changes Normal DLL Search Path

ID: Q149430

The information in this article applies to:

SYMPTOMS

A Visual Basic program may not run under Windows 95 or Windows 98 because a 16-bit DLL that has been listed in the registry as a Known16dlls has been moved from the Windows\System directory.

CAUSE

The Registry has a Known16dlls key entry for a DLL that has previously been loaded. If there is an entry in this key for a specific DLL then Windows looks for the DLL file in the Windows\System directory first and then follows the normal DLL search path. If this DLL has been moved to another location, the key entry will still be in the registry. This could cause the wrong version of a DLL to be used.

RESOLUTION

Use RegEdit to find and delete the Known16dlls entry for this DLL. Windows 95 and Windows 98 will now search for the DLL in the normal way. Once Windows 95 and Windows 98 finds and loads the DLL, a new Known16dlls key entry is made in the registry.

MORE INFORMATION

The registry key Known16dlls is located in the following section of the registry:

   \\HKEY_LOCAL_MACHINE
        System
           CurrentControlSet
              Control
                 SessionManager

If there is an entry in the Known16dlls key for a DLL that a Visual Basic program requires, Windows 95 and Windows 98 will first look in the Windows\System directory, and then follow the normal search path below.

Under Win16

1. The current directory.

2. The Windows directory.

3. The Windows system directory.

4. The directory containing the executable file for the current task.

5. The directories listed in the PATH environment variable.

6. The list of directories mapped in a network

   If the DLL is moved from the Windows\System directory to a new location,
   the Known16dlls key is not deleted; because of this, Windows will
   continue to look for the DLL in the Windows\System directory first.

Additional query words: kbVBp400 kbRegistry kbWinOS98 kbWinOS95 kbDSupport kbdsd
Keywords          : kbDLL kbVBp400 
Version           : 4.00
Platform          : WINDOWS
Issue type        : kbprb

Last Reviewed: November 11, 1998