Discussion of article "Guide to writing a DLL for MQL5 in Delphi" - page 3

 

help anyone who can ...

in delphi 7 dll procedure...

procedure test1(var data: array of Double); stdcall;
begin
ShowMessage('Entered ');

end;

in mt4 :

#import "gayss.dll"
void test1( double &data[] );
#import

ArrayResize(data, 6);
data[0]= 2;
data[1]= 4;
data[2]= 8;
data[3]= 16;
data[4]= 21;

data[5]= 3;

test1(data);

and an error pops up. 2014.02.06 17:39:04.241 stack damaged, check DLL function call in 'SOG_2014.mq4' (80,7)

Maybe someone knows how to do it properly....

 
MetaQuotes:

New article Guide to writing a DLL for MQL5 in Delphi has been published:

Author: Andrey Voytenko


If you are working with older versions of delphi, like me, D7, you can use conversion functions or use the jcl library there is unicode for you to use, it is a free component package just enter sourcefoge.net and search for jcl download and install

 
DooMGuarD:
Hi DooMGuarD, great information! Thanks for sharing!
 

Hello Andrey, your article is excellent, congratulations.

I have a doubt. I have RAD Studio 10 Seattle. When I entry to "Project Options for..."(Shift + Ctrl + F11) I find the next:

I do not find the checkButton"Build with runtime packages". I want to request a recomendation about "What must I do about this?". Thank you for your attention.

 

I had to change a part of the code source.

however, when I run the source code

 
Jorge Fernando De Los Ríos De Los Ríos:

I had to change a part of the code source.

however, when I run the source code

sorry, I had not read all the article
 
Jorge Fernando De Los Ríos De Los Ríos:

Hello Andrey, your article is excellent, congratulations.

I have a doubt. I have RAD Studio 10 Seattle. When I entry to "Project Options for..."(Shift + Ctrl + F11) I find the next:

I do not find the checkButton"Build with runtime packages". I want to request a recomendation about "What must I do about this?". Thank you for your attention.

however:

 
These codes only run in 32 bits