lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Good evening,

Here is where I am at.  I am using Visual Studio 2008, with a solution
setup to emit an x86 executable (rather than "All CPUs").  I have a
reference to the luaInterface.dll that was installed with Lua for
Windows.  This is a straight windows forms application using the .net
framework 3.5.

I am copying the following DLLs to the application directory (all of
them came from the luaforwindows install directory):

lua5.1.dll
lua51.dll
LuaInterface.dll
luanet.dll
luars232.dll
msvcr80.dll
mysql.dll
odbc.dll
sqlite3.dll

In my code I am trying to instantiate an lua object like this:

using LuaInterface;
namespace BPMigrateGUI
{
   public class LuaSupport
   {
   private Lua pLua = null;
   public LuaSupport()
       {
           Lua pLuaVM = new Lua();  <<<< Problem happens here
       }
  }
}

When I attempt to execute the line shown above I get the following
exception message:

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

Any ideas what I am doing wrong?  Anyone have a sample visual studio
2005 or 2008 .NET C# (or VB) project that uses the components supplied
with Lua For Windows that works?  As you can tell from DLL list I will
be attempting via the script to require "luaSQL" at some point.

Thank you for your time.

Terry Bayne

-- 
If you lose your name you become small,
If you lose your spirit you become nothing