Having a problem with DLL trying to return several values. Please help.
Hmmm, believe I had the same problem... returned an array instead.
check: 'MySQL wrapper'
I guess the solution is in there.
Hmmm, believe I had the same problem... returned an array instead.
check: 'MySQL wrapper'
I guess the solution is in there.
You agree to website policy and terms of use
For some reason, my indicator crashed when I try to return several values through a DLL. Currently in my DLL I have something like this
MT4_EXPFUNC void __stdcall myDLL(const double x, const double y, double& sum, double& product)
{
sum=x+y;
product=x*y;
}
In my mq4 code, I have
#import "myDLL.dll"
void myDLL(double x, double y, double& sum, double& product);
#import
int start()
{
double x=2.0;
double y=3.0;
double sum,product;
myDLL(x,y,sum,product);
}
The terminal crashes when I try to run this. It also crashes if I change the mq4 code to
#import "myDLL.dll"
void myDLL(double x, double y, double sum, double product);
#import
int start()
{
double x=2.0;
double y=3.0;
double sum,product;
myDLL(x,y,sum,product);
}
Where is my mistake?