lua-users home
lua-l archive

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

Luiz Henrique de Figueiredo wrote:
> >So, yes we need a good way to add third party libraries to an
> existing Lua
> >executable without having to recompile it.
> I think loadlib can help here:
> --lhf

I know loadlib and appreciate it exists (I have not tried it yet) because it
opens an interesting functionality and is portable.
I am not sure how to use it to load other Lua libraries though (still a Lua
beginner!). I will try anyway.

In another (quite related) subject, I am a bit frustrated by this code,
because it is limited to void foo(void) functions.
I am looking for a way to declare any Windows DLL function in a way similar
to VB "Declare Function":
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd
As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

No need to take exactly this syntax, perhaps we should instead create a
table with the needed declarations.
If we can do this, this opens a lot of system integration, we can even do UI
programming in Lua (yes, I know I can already use Tk).
Of course, there are some problems, like mapping Windows types to Lua types,
declaring structures, managing callbacks, etc.
Some work exists already, like the LTN 5, I still have to dive deeply into
So if somebody have already done a similar task, and can share either code
or tips, I would be glad.

Allowing the use of OCX ie. objects, like:
set fso = CreateObject("Scripting.FileSystemObject")
would be a big plus too.
Searching the Web, I found that somebody claimed having done a Lua
integration to WSH (Windows Scripting Host). Does anybody here know where to
find it, if publicly available?


Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist