我有一个使用C++编写的遗留代码的DLL,无法修改源代码。我希望能够从Lua调用DLL中的一些函数。如何从Lua中调用C++ DLL中的函数?
例如,我想要做这样的事情:
-- My Lua File
include(myCppDll.dll)
function callCppFunctionFromDll()
local result = myCppFunctionFromDll(arg1, arg2)
--Do something with result here
end
是这样的可能吗?
请注意,外星人已经包含在Lua for Windows版本中。 – RBerteig 2010-05-14 22:14:56