Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Loader lock error

Tags:

c#

loaderlock

I am building on C++ dll, by writing code in C#.

I get an error, saying

LoaderLock was detected Message: 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.

I tried seraching what this error exactly means, but I am drawing pointless articles, mostly saying that it's just a warning, and I should switch that off in Visual Studio. The other solutions seem to be due to ITunes, or this problem occurring when programming with DirectX. My problem is connected to neither.

Can anybody explain, what this actually means?

like image 858
Devdatta Tengshe Avatar asked Sep 11 '08 14:09

Devdatta Tengshe


1 Answers

you need to go to menu Debug -> Exceptions, open the Managed Debugging Assistants, find LoaderLock and uncheck

http://goo.gl/TGAHV

like image 152
ghiboz Avatar answered Oct 21 '22 11:10

ghiboz