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.
hello,
datetime in MQL is 8 bytes long :)
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.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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 !