Microsoft KB Archive/149430

From BetaArchive Wiki
Knowledge Base


Article ID: 149430

Article Last Modified on 2/12/2007



APPLIES TO

  • Microsoft Visual Basic 4.0 Professional Edition
  • Microsoft Visual Basic 4.0 16-bit Enterprise Edition
  • Microsoft Windows 95
  • Microsoft Windows 98 Standard Edition



This article was previously published under Q149430

SYMPTOMS

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:

256986 Description of the Microsoft Windows Registry



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

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

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.


Keywords: kbdll kbprb kbregistry KB149430