2014-06-16 70 views
3

我正在編程Lua 5.0.2腳本語言,我想加載我自己的C# DLL並在我的Lua代碼中調用它的函數。從LUA腳本環境調用C#DLL

此功能,如下面:

string Concat(string S1, string S2) 
{ 
    return S1+S2; 
} 

反正有沒有達到這個目標? 請幫我。

+0

http://techneilogy.blogspot.de/2012/02/compiling-lua-with-visual-studio-2010.html – jozi

+0

http://stackoverflow.com/questions/20288621/can-ac-dll-file -be-loaded-in-lua – htaghizadeh

+0

http://stackoverflow.com/questions/13381565/how-to-create-a-custom-net-dll-loadable-for-luaforwindows – jozi

回答

0

我不熟悉C#,但你可以使用這個答案從C調用C#函數首先嚐試:Calling C# from C

之後你這樣做,你可以創建調用C#函數Lua的C函數,並正常加載那些。