LoaderLock was detected error in VS2005 while using ToneDecoder.Net , WaveEx.Net or TAPIEx.Net
Q: Added ToneDecoder.NET.dll to my project. When I try to create an instance of ToneDecoderNet.PhoneToneDecoder(), I get folowing error:
LoaderLock was detected
Message: DLL '..ToneDecoder.NET.dll' is 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.'
A: While debugging the demo sample in VS2005, if it report the "loaderlock was detected" error, to get rid of it, you could disable the MDA option in IDE of VS2005. How to?
In "Debug" menu----> "Exceptions"----> "Managed Debugging Assistants", uncheck "LoaderLock", please see the screenshot