aardio调用dll
作者:互联网
刚知道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)) }
标签:调用,int,aardio,dll,export,result,my 来源: https://www.cnblogs.com/ziyouchutuwenwu/p/11199038.html