Microsoft KB Archive/87967

= FIX: CVW 4.0 Does Not Work with Dynamically Loaded DLL =

Article ID: 87967

Article Last Modified on 9/30/2003

-

APPLIES TO


 * Microsoft CodeView 4.0
 * Microsoft CodeView 4.01

-



This article was previously published under Q87967



SYMPTOMS
Microsoft CodeView for Windows (CVW) version 4.0 and 4.01 may not work with a DLL that has been dynamically loaded, freed, and loaded again. Problems include not stopping on existing breakpoints, not allowing new breakpoints, watches displaying invalid or incorrect data, and mixed source/assembly mode showing the wrong code.



CAUSE
CVW associates source lines and symbols with addresses when programs and DLLs are loaded into memory. When Windows loads, frees, and loads a DLL again, the DLL may be loaded into a new area of memory. CVW is not updating the addresses of the symbols when this occurs.



RESOLUTION
If the DLL is loaded by another program before CVW is used, the DLL is not loaded or freed by the program that is being debugged. Windows will not load more than one copy of a DLL. It will just increase or decrease the instance count of the DLL when the program is being debugged.

The solution to this problem is to create a stub program that loads the DLLs that are being dynamically loaded. This program can be run before running CVW.



STATUS
Microsoft has confirmed this to be a problem in Microsoft CodeView for Windows versions 4.0 and 4.01. This problem was corrected in CodeView version 4.1.



MORE INFORMATION
A dynamically loaded DLL is a DLL that is loaded using the LoadLibrary Windows API function.

Additional query words: 4.00 4.10 FreeLibrary

Keywords: kbfix kb16bitonly KB87967

-

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

© Microsoft Corporation. All rights reserved.