lua-users home
lua-l archive

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


2007/5/22, Antonio Scuri <scuri@tecgraf.puc-rio.br>:
> > Hum, I didn't know. I'll fix the redundancy and remove my
> code. Sorry
> > for the spam :-)
>
> Why to remove the code? It's just one more solution to the
> problem and is definitely not spam :)

  Couldn't agree more. It is a different solution. In fact, LuaBinaries also
uses a different solution, a none automatic one...

I finally created a new page on the wiki to better explain differences
between my solution and Shmuel's.

Today I compared my dll with the ones from Shmuel and the one in
LuaBinaries, and I found several differences:
- my dll weighs only 6-7kB, against 14kB for Shmuel proxy DLL or 9kB
for LuaBinaries proxy DLL
- the Microsoft Dependency Walker clearly show the exported functions
in my DLL as forwarded exports, whereas the functions in Shmuel and
LuaBinaries appear like regular functions
- Shmuel's DLL is dependent on lua5.1.dll, kernel32.dll and
msvcrt.dll, LuaBinaries DLL is dependent on lua5.1.dll, whereas my DLL
has zero dependencies

I think Shmuel proxy DLL encapsulate the liblua5.1.a import library,
and reexports the stub functions (I'm not sure though, the stubs are
not real functions, they don't appear in the call stack, so can they
be reexported ?).

I'm not sure about the mechanism in LuaBinaries proxy DLL, I haven't
found how it is created. But after some experiments, I think it's
similar to Shmuel's one, but instead of using GCC import library it
encapsulate and reexports the VisualC++ import library (lua5.1.lib),
which is lighter and apparently not dependent on the C runtime and the
kernel.

My proxy DLL is different. It is a resource-only DLL containing export
forwarders. It's a kind of meta-data that the kernel DLL loader
recognize and use to forward calls to other DLLs.

The kind of DLL I craft are the lightest possible, and I don't see any
advantage in the two other alternatives. Tell me if I'm wrong (for the
sake of future users of these proxies). Here is the wiki page :

http://lua-users.org/wiki/LuaProxyDllThree