Home All Groups Group Topic Archive Search About

Loader Lock in MFC mixed application

Author
16 Jun 2006 11:56 AM
Luis F. Rodas
When I use the debugger in Microsoft Visual Studio 2005 to debug my
Microsoft Foundation Classes (MFC) class library application, I receive an
error message:
"Managed Debugging Assistant 'LoaderLock' has detected a problem in
<filename.exe>. Additional Information: 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."

This problem does not occur when I run the same MFC class library
application outside the debugger.

I found a fix on http://support.microsoft.com/kb/913996/en-us. How do I get
this fix ?

Best Regards,

Luis F.
(Indusoft Team)

Author
16 Jun 2006 12:34 PM
Jochen Kalmbach [MVP]
Hi Luis!

> I found a fix on http://support.microsoft.com/kb/913996/en-us. How do I get
> this fix ?

Isn't it explained in the KB article?
You just need to contact your local MS subsidiary and tell them the
problem and KB article...

Greetings
   Jochen
Author
19 Jun 2006 3:34 PM
Ben Voigt
"Luis F. Rodas" <supp***@indusoft.com> wrote in message
news:%237f8evTkGHA.1260@TK2MSFTNGP05.phx.gbl...
> When I use the debugger in Microsoft Visual Studio 2005 to debug my
> Microsoft Foundation Classes (MFC) class library application, I receive an
> error message:
> "Managed Debugging Assistant 'LoaderLock' has detected a problem in
> <filename.exe>. Additional Information: 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."

It's a warning, not an error.  Why are you running an MFC application with
Managed Debug Assistants?  Are you using .NET components so that you need to
compile with /clr?  Without /clr the problem does not exist.

>
> This problem does not occur when I run the same MFC class library
> application outside the debugger.

Yes it does, but you do not receive the warning because the check is
disabled.

Show quote
>
> I found a fix on http://support.microsoft.com/kb/913996/en-us. How do I
> get this fix ?
>
> Best Regards,
>
> Luis F.
> (Indusoft Team)
>
>

AddThis Social Bookmark Button