Microsoft KB Archive/123809

= FIX: Development Environment Doesn't Unload DLL on Termination =

Article ID: 123809

Article Last Modified on 10/24/2002

-

APPLIES TO


 * Microsoft Visual C++ 2.0 Professional Edition

-



This article was previously published under Q123809



SYMPTOMS
The Visual C++ development environment may fail to unload a DLL from memory if an abnormal program termination occurs.



CAUSE
The Visual C++ development environment loads the DLLs into memory when the application starts in the debugger. An abnormal program termination may cause the debugger to fail to remove the DLLs from memory.



RESOLUTION
When this happens, you need to exit the development environment and possibly even log off Windows NT to force the DLL to be removed from memory.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Visual C++, version 6.0.



MORE INFORMATION
To reproduce this problem, it is necessary to create a Win32-based application that calls a Win32-based DLL. That DLL should call another DLL. You can use the SELECT example from the Win32 SDK samples, and add another DLL with a single function. Call it from one of the SELECT.DLL functions.

Once this is set up, remove the secondary DLL from your hard drive. Then attempt to debug the program in the Visual C++ development environment. An error message will appear saying it could not find the secondary DLL, and the executable will terminate.

Now, attempt to delete the primary DLL being called. Windows will generate an error message saying that the primary DLL is still in use, even though the application calling the DLL was terminated.

Additional query words: IDE workbench

Keywords: kbbug kbfix kbide kbvc600fix KB123809

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.