1、直接运行exe
执行(sFileName:程序名;sParam:传参,传多个参数用空格分隔;sFilePath:程序路径)
ShellExecute(0, 'Open', PChar(sFileName), PChar(sParam), PChar(sFilePath), SW_SHOW);
被调用程序里接收参数(参数是传参的索引,1就是第一个参数)
ParamStr(1);
2、只调用exe中的方法
被调用程序要在exports下写上方法名
exports
aaa index 1;
调用方法
implementation
function aaa(x:integer):integer;stdcall; external'plus1.exe';
aaa(StrToInt(Edit3.Text));