Download MetaTrader 5
To add comments, please log in or register
Search in documentation is available via MetaTrader 5. Search and learn!
Jitendra Parmar
1093
Jitendra Parmar 2014.03.24 18:25 

I am trying to call a function from dll written in C# named

bool CyboLoadBuffer(double &buffer1[], int size, double &buffer2[], double &buffer3[], string symbol, double a, double b, double c, double d, double e, double f, double g );

from my expert it shows error Stack damaged, check DLL function call in 'MyExpert.mq4 "

what I noticed is when I remove the parameter double &buffer3[] from function in mq4 and dll, it works fine :)

but I try adding one more parameter double &buffer3[], it shows error :(

does any one encounter the same issue ?

please help !

smimon
127
smimon 2016.01.06 20:27  

Long time ago this, but just had the same thing - the cause in my case was that the data type of one of the parameters was not was what was expected by the DLL function.

My DLL function was expecting an int parameter in epoch time format, and I thought since the MQL4 datetime type was also 4 bytes, I could pass it in directly, but apparently not. 

Demos Stogios
184
Demos Stogios 2016.01.07 15:19  

hello,

datetime in MQL is 8 bytes long :) 

Jason Separovic
15
Jason Separovic 2016.02.07 09:55  
Hoodlum:

Long time ago this, but just had the same thing - the cause in my case was that the data type of one of the parameters was not was what was expected by the DLL function.

My DLL function was expecting an int parameter in epoch time format, and I thought since the MQL4 datetime type was also 4 bytes, I could pass it in directly, but apparently not. 

This helped me. Cheers
/
To add comments, please log in or register