lua-users home
lua-l archive

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


Hi there,

I'm looking at lua for driving a utility that loads it functions from dll's. The available functions are enumerated by the main app via an interface into the dll, all functions have the same type and retrieve their parameters off an internal stack. The problem i want to solve is exposing these functions to lua. Currently the parameter types are encoded by the plugin developer so the main app can type check its input and it would be nice to be able to make these available lua.

The only thought i have is to auto generate a lua script that implements a function stub of the same name as the the dll function, push the function name and all its parameters into a table and call a 'c' side do_function_call that pulls this info and makes the call.

Does anyone have any better ides for doing this?

Thanks

Martin