刚知道aardio这个不错的玩具,可惜作者停更了,贴一个调用dll的例子备用吧
vc代码
extern "C" _declspec(dllexport) int _stdcall my_export(int a,int b) {     return a + b; } def文件
LIBRARY "my_dll" EXPORTS my_export
aardio代码
mainForm.button.oncommand = function(id,event){     //后面默认是stdcall调用,写错会各种崩溃     dll  = raw.loadDll("D:\projects\vc\my_dll\Debug\my_dll.dll"); /*     MyExportFunc = dll.api("my_export","int(int, int)");     result = MyExportFunc(1, 2); */     //函数可以直接调用     result = dll.my_export(1,2)     win.msgbox(tostring(result)) }