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 !
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.
datetime in MQL is 8 bytes long :)
To add comments, please log in or register