A blog on Tally Integration, to import and export data from Tally.ERP programmatically using VB6, VB.NET,C#,ASP.NET etc

Friday, March 6, 2009

Attempting managed execution inside OS Loader lock

I am trying to link my VB.NET / C# application with Tally using RTSlink DLL. But I get this error while calling Open() function :-

"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. "

Solution 1
1. Go to Debug/Exceptions
2. Open up the Managed Debugging Assistants node on the tree and scroll down till you find LoaderLock and uncheck it.

After this recompile the project.

Solution 2
1) If you cannot find that the "Exceptions" option under "Debug" menu-option in Visual Studio, then refer this link to get it back.
2) Next, follow the steps given in Solution 1.


1 comment:

Siv said...

Tried the above soltuion which worked. Thanks.