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); #import 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?
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!
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
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;
Example:
extern "C"
{