tlhflfsx Posted September 12, 2011 Report Posted September 12, 2011 Is it possible to call external dll's from within lua such as you can for the various gfd dll's. In particular I would like to be able to access functions in the PokeysDevice_DLL.dll so that I can control various LED's.
Pete Dowson Posted September 12, 2011 Report Posted September 12, 2011 Is it possible to call external dll's from within lua such as you can for the various gfd dll's. The GFD (Go Flight Display) library is built in, it isn't external. In particular I would like to be able to access functions in the PokeysDevice_DLL.dll so that I can control various LED's. Lua can call external DLL's as Modules provided they have functions written with a Lua interface in mind. I really can't tell you more that what I can read in the Lua reference manual. There are a number of ready-written external DLLs which will work -- the Lua gd Graphics library, for instance, which i know is already being used for Saitek gauge display modules. If the DLL you want to use isn't written with Lua access in mind you'd probably need to write your own DLL which acts as a wrapper for it, exposing its functions as Lua functions. Regards Pete
tlhflfsx Posted September 21, 2011 Author Report Posted September 21, 2011 (edited) As a followup I just wanted everyone to know that I was able to connect to the PoKeys55T from lua programming. The PoKeys55T DLL is a COM ActiveX enviroment so using a combination of lua5.1.dll and luacom.dll you can create an object that can be controlled from within the FSX / FSUIPC /lua program. Here as a sample of an lua I created that monitors the status of the landing gear and than turns the correct LED on or off. fsx_pokeys.lua.txt Edited September 21, 2011 by tlhflfsx
Pete Dowson Posted September 22, 2011 Report Posted September 22, 2011 As a followup I just wanted everyone to know that I was able to connect to the PoKeys55T from lua programming. The PoKeys55T DLL is a COM ActiveX enviroment so using a combination of lua5.1.dll and luacom.dll you can create an object that can be controlled from within the FSX / FSUIPC /lua program. Here as a sample of an lua I created that monitors the status of the landing gear and than turns the correct LED on or off. Brilliant! I didn't know about luacom. Do you think you could post something on these lines in the User Contributions sub-forum, as a more permanent reference? Messages here tend to scroll off out of sight very quickly! Thanks, Pete
tlhflfsx Posted October 5, 2011 Author Report Posted October 5, 2011 Pete, I uploaded a sample lua into the User Contributions sub-forum that shows how to interface to a poKeys55T / poKeys56U / poKeys56E device in addition to showing how you can use the luacom.dll to communicate between external DLL(s) and lua. Thanks for such an outstanding product. Terry
Pete Dowson Posted October 5, 2011 Report Posted October 5, 2011 I uploaded a sample lua into the User Contributions sub-forum that shows how to interface to a poKeys55T / poKeys56U / poKeys56E device in addition to showing how you can use the luacom.dll to communicate between external DLL(s) and lua. Thanks for such an outstanding product. And thanks for offering your work for others. It looks very professional! Best Regards Pete
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now