(alien was built into S+ at 1.1.9)
Example Lua Script to directly call user32.dll to display a message box (not via the bound acMessageBox(), this is directly calling it):
local alien = alien.core local mb = alien.load("user32.dll") local messagebox = mb.MessageBoxA messagebox:types{ ret = 'long', abi = 'stdcall', 'long', 'pointer', 'string', 'long' } test = "test" messagebox(0, test, "test2", 0)
Remember, alien.core and alien.struct are preloaded, so you do not need to add:
require "alien"
..in your Lua script (as many sample scripts on the Internet do), you will receive an error, unless the alien DLLs are somewhere in the path, but I'm not so sure they would play well together...so that's at your own risk. |