Mt4 Build 600 or Higher MinGw

Back to topics list To post a new topic, please log in or register
crn 2014.02.24 21:27


I using for development QtCreator and newwest MinGw. For Build 600 I didnt get any problem. After that build I got SEGFAULT when I try call any function.

I using def file;


extern "C"

int dll_test( MqlStr * str);

 int dll_test( MqlStr * str)
   return 0;

DllMain function is called. I got inforation when:

Anybod Could help?

Big regards
ydrol 2014.02.24 23:17 #
Hi see here
crn 2014.02.24 23:35 #

I used this struct ( i found this art)

struct MqlStr

    int len;
    wchar_t* string;
    int dummy; // for padding

Also in my function I dont call any obejct.pointers/etc from parameters

So that is mabye call convention?

Maybe __stdcall ls not correct for new build?

MT4 Code:
#import "pocBuild600.dll"
int dll_test(string &s);
Withoud any code (i try only logger/messagebox etc., print int to std,file,any action ) I got error of MT4 and terminated process.

Anybody have idea why?
micclly 2014.02.25 02:34 #

If you want to pass just a string, try to use wchar_t* instead of MqlStr.

string argument (in MQL) is not needed defined as string& but string.

If you want to pass back the string from dll into the argument, allocate ushort[] variable in mql and pass it to dll, and receive it as wchar_t* in dll side.

Add: you had pasted the src code and manually highlighted it? try to use SRC button in the toolbar of this form!

Back to topics list  

To add comments, please log in or register