BUG: Development Environment Doesn't Unload DLL on Termination

Last reviewed: January 18, 1996
Article ID: Q123809
The information in this article applies to:

   The development environment included with:
     - Microsoft Visual C++, 32-bit Edition, version 2.0

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. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

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 reference words: 2.00 IDE noupdate
KBCategory: kbusage kbbuglist
KBSubcategory: VWBIss


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 18, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.