Using LuaInterface - ERROR_DLL_INIT_FAILED

I am trying to integrate Lua into my managed code using LuaInterface. I am using lua51.dll, which comes with the assembly that I downloaded, but when I try to create a new Lua object, the constructor fails with ERROR_DLL_INIT_FAILED or HRESULT 0x8007045A. I checked that I am creating x86. What else could be the problem?

+3
source share
3 answers
  • Perhaps you mix 32 bit and 64 bit?
  • Is it possible that you might have a different version on your way?
  • Try running with elevated privileges.
  • Test your DLL with Dependency Walker
+1
source

To make sure you compile as 32 bits, add x86 to the csproj file.

I had a similar problem, but I would like to guess that you are not as stupid as I am because I think you are compiling 32 bits when it actually compiles as 64-bit.

0
source

Source: https://habr.com/ru/post/1757910/


All Articles