1.编写C文件 #include <stdio.h> //定义一个函数将两个参数相加. int add(int a , int b) { return a+b; } 2. 编译dll文件 tcc -shared -rdynamic test.c 生成test.dll文件 3.在autohotkey中使用 ;使用DllCall函数调用test.dll中的add函数 Result := DllCall("test\add","Int", 10,"Int", 2) MsgBox % Result