I am working with a series of DLLs that are loaded as individual CView
classes in a MFC application using LoadLibrary
from WinBase.h
.
Building for release works and all the various DLLs load. However, when I do a debug build with Visual Studio 2010, one (and only one) of the DLLs fails to load. All the DLLs are similarly designed. Using the debugger, I can see that LoadLibrary
is getting error 998 (ERROR_NOACCESS
, Invalid access to memory location.). I turned on break at access exception and the bad access appears to occur within the strcmp
assembly at the instruction cmp al, [ecx]
(ecx
is 6D655277 at this point).
However, I am not sure how to further track down this bug (and Visual Studio tends to crash whenever I break at the access violation, making it even harder).
Any suggestions or past experiences are much welcome.