My first question would be how did you get MT4, originally before the upgrade, to read a managed code DLL?
Never mind. Just saw this line in code:using RGiesecke.DllExport;
nondisclosure:
Never mind. Just saw this line in code:using RGiesecke.DllExport;
Never mind. Just saw this line in code:using RGiesecke.DllExport;
Solved. I re-added the "UnmanagedExports Nuget package" and suddenly it works again.
Happy trading to all!
I have a similar problem using this approach but im calling a string function from c# to mt4 and its not working, it is working for int functions though.
[DllExport("testString", CallingConvention = CallingConvention.StdCall)] public static string testString() { return ("this is a test string"); }
in the terminal window it returns strange text "??????????g", I have all the correct references and my compiled dll and "RGiesecke.DllExport.Metadata.dll" in the \MQL4\Libraries\ folder, why is this not returning simple text back to mt4?
#import "mytest.dll" string testString(); #import
Found it, have to use this way:
[return: MarshalAs(UnmanagedType.LPWStr)] public static string mystring([MarshalAs(UnmanagedType.LPWStr)] string clearText) { ... }
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
Hello!
I need to update my DLL because of changes in build 610. My old DLL and EA compiled before upgrade to 610 works fine in it. But I am not able to run even the simplest new expert + DLL now.
I am using Visual Studio 2010 and C#. DLL is compiled as 32bit.
Operating system: Windows 7 Prof 64bit
Here is my C# code:
This is my EA:
And here is my result:
What can be a problem?
I am even not able to run the DLLSampleTester.mq4 included in installation. MT4 says: 'DLLSampleTester' is not expert and cannot be executed
I am sitting the whole day on it and I am really desperate.
Help me, please.
Bob