lua-users home
lua-l archive

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


On Mon, Apr 18, 2016 at 6:54 PM, Paul K <paul@zerobrane.com> wrote:
> So if my Lua module was built with Lua 5.2 for Windows, it will have an import blob that says "load lua52.dll, find lua_verison, lua_tonumber, etc in its export section and use them". Having those same functions exported from my host.exe is useless, because the loader won't even look there.

Right, on Windows you'd need to have a proxy DLL that will forward
those requests to the exported functions in the main executable. See
http://lua-users.org/wiki/LuaProxyDllFour and this thread for the
related discussion:
http://lua-users.org/lists/lua-l/2013-11/msg00831.html

Ah, indeed. A cursory examination of the project indicates that it actually creates a function with a jump to the real thing. I wonder if this approach can be used instead:

https://blogs.msdn.microsoft.com/oldnewthing/20060719-24/?p=30473

I am actually pretty sure it can be, I just do no think I will have enough time within the next few days to play with this.

Cheers,
V.