Click to See Complete Forum and Search --> : What's up with this new Loader Lock exception?


bendx
December 5th, 2005, 06:15 PM
I'm getting an exception that looks like below when my debug C# app calls
into my debug C++ dll (which uses the MS CRT, debug dll).

Apparently if I go to the Menu>Debug>Exceptions>Managed Debugging Assistants
and unchecked Loader Lock checkbox, the exception goes away but I get a
message saying that I'm trying to use a dll that's loading the CRT without a
manifest file.

This must all be part of this new manifest side-by-side stuff that is
introduced in VS2K5. However I am not getting this problem when I run the
release build of my solution and I cannot for the life of me figure out what
Microsoft wants you to do here. All I want to do is call into my dll, why has
this become so hard to do in the new version of VS.NET ??

Loader Lock was detected:
Attempting managed execution inside OS Loader lock. Do not attempt to run
managed code inside a DllMain or image initialization function since doing so
can cause the application to hang.