Download MetaTrader 5

Imported DLL method, why this syntax error?

To add comments, please log in or register
Alberto L.M.
24
Alberto L.M.  

Hi all, 

 DLL function ...

_DLLAPI double TestArrayFn(double *arr) {

   return 0;


MQL5 ...

#import "TestDLL.dll"

double  TestArrayFn(double &arr[]);

#import

 

And using imported method... 

  double arr[];

  double result =  TestArrayFn(arr);

Im getting a "syntax error" when compiling , hmm  cant figure out what's wrong. 

Slava
Moderator
6936
Slava  

What the syntax error do You get?

I did get no error when comiled your code

Alberto L.M.
24
Alberto L.M.  

Good, i retested and runs smoothly. I dont understand because I received this error.

Anyway thanks for support. 

To add comments, please log in or register