This App is No Longer Maintained. Visit the Replacement at StrokesPlus.net

StrokesPlus Forum
                       
StrokesPlus Forum
Home | Profile | Active Topics
Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Feature Updates
 New Features
 [ADDED] alien.core and alien.struct built in
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Rob

USA
2615 Posts

Posted - 01/09/2012 :  06:37:32  Show Profile  Visit Rob's Homepage
Added in 1.1.9:

alien.core and alien.struct are now built into StrokesPlus!

With this functionality, you can directly call external DLLs, be they Windows DLLs like USer32.dll or some other DLL.

Note that alien.core and alien.struct are ALREADY preloaded into the Lua environment, so if you include:

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.

Note that making direct calls can cause S+/the Lua engine to crash hard if you screw something up in the script or defining the call(s), so again, this is a use at your own risk disclaimer. I would recommend installing Lua for Windows and testing scripts in there if you're having problems. I'm not a Lua expert, I'm about as novice as possible, I just know this functionality needed to be in StrokesPlus and I've been determined to shoehorn it in any way I could!

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)

  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
StrokesPlus Forum © 2011-2018 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000