library myDLL;{这个DLL动态连接库是一个计算参数的两倍、三倍的值的功能 }uses
ShareMem,
SysUtils,
Windows;
//Dialogs;{$R *.res}
function Triple(N:Integer):Integer;stdcall;
begin
Result:=N*3;
MessageBox(0,'返回的三倍结果','DLL返回信息!',mb_OK);
end;function Double(N:Integer):Integer;stdcall;
begin
Result:=N*2;
MessageBox(0,'返回的两倍结果','DLL返回信息!',mb_OK);
end;function GetStr(A1:OleVariant;A2:OleVariant):OleVariant;stdcall;
begin
Result:=A1+A2;
MessageBox(0,'返回的字符结果','DLL返回信息!',mb_OK);
end;exports
Triple,Double,GetStr;end.在BCB中调用GetStr报错!!
ShareMem,
SysUtils,
Windows;
//Dialogs;{$R *.res}
function Triple(N:Integer):Integer;stdcall;
begin
Result:=N*3;
MessageBox(0,'返回的三倍结果','DLL返回信息!',mb_OK);
end;function Double(N:Integer):Integer;stdcall;
begin
Result:=N*2;
MessageBox(0,'返回的两倍结果','DLL返回信息!',mb_OK);
end;function GetStr(A1:OleVariant;A2:OleVariant):OleVariant;stdcall;
begin
Result:=A1+A2;
MessageBox(0,'返回的字符结果','DLL返回信息!',mb_OK);
end;exports
Triple,Double,GetStr;end.在BCB中调用GetStr报错!!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货