lua-users home
lua-l archive

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


On 30/01/2008, Joshua Jensen <jjensen@workspacewhiz.com> wrote:
> [...]
> You can cheat the system, though.
>
> Add lua51.dll to the Delay Load DLLs list.  As soon as your application hits
> main()/WinMain(), call GetModuleFileName() to retrieve the full filename of
> MyApp.exe (don't rely on argv[0]).  Strip the MyApp.exe from there to get
> the path to MyApp.exe and append support/lua51.dll to it.  Call
> LoadLibrary(pathExcludingMyAppExe + "support/lua51.dll").
> Then everything will work as normal.

Doesn't this become a problem, if you're going to load other dll's
that themselves depend on the Lua dll being present (e.g. any C
library with lua bindings)? I could be dead wrong here, haven't tried
this.

Mark