Stack damaged, check DLL function call in 'MyExpert.mq4 "

Back to topics list To post a new topic, please log in or register
avatar
21
hijeenu 2014.03.24 19: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 !

avatar
40
Hoodlum 2016.01.06 21: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. 

avatar
126
Demos 2016.01.07 16:19 #
 

hello,

datetime in MQL is 8 bytes long :) 

avatar
11
jseparovic 2016.02.07 10: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
Back to topics list  

To add comments, please log in or register