mq4调用dll,如何同时获取多个返回值?

 

本人用delphi编写了一个dll,源如下

library GoodHelper11;

uses
SysUtils, Dialogs,
Classes;

{$R *.res}

function Add(a,b: double; out c:double):double; stdcall;
begin
c := Abs(a)+Abs(b);
Result := a+b;
end;

exports
Add;

begin
end.

mq4中申明如下

#import "GoodHelper11.dll"
double Add(double a, double b, double& c);

#import

...

double r1,r2;
r1 = Add(1,-2,r2);
Alert("1-2=",r1,",1+2=",r2); //运行结果,提示,"critical error"

....

请高手指点,谢谢。

本人的电话13601081622,qq651994960