How to call a function from a DLL file from [ MQL5 ] code?
<p><strong>Why</strong> the first <strong><code>MessageBox()</code></strong> works and the second doesn't?</p>

<p>I don't know where the problem is.</p>

<p>Does the <strong><code>MQL5</code></strong> can access the <code>dll</code> file?</p>

<p>I need to to call <code>C#</code> functions that read <strong><code>JSON</code></strong>.</p>

<p>No errors appear in <kbd>MetaEditor</kbd>.</p>

<p><strong><code>C# .dll</code></strong> file:</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
namespace TestMe
{
    class Test
    {

   // [DllExport("Add", CallingConvention = CallingConvention.StdCall)]
    public static int Add(int left, int right)
    {
        return left + right;
    }


    public static int Sub(int left, int right)
    {
        return left - right;
    }


    public static double AddDouble(double left, double right)
    {
        return left + right;
    }


    public static float AddFloat(float left, float right)
    {
        return left + right;
    }
}
}
</code></pre>

<p>this is an <strong><code>MQL5</code></strong> code:</p>

<pre><code>#import "TestMe.dll"
                    int    Add(       int    left, int    right );
                    int    Sub(       int    left, int    right );
                    float  AddFloat(  float  left, float  right );
                    double AddDouble( double left, double right );
#import

#property strict                 // MQL-syntax-mode-modifier == "strict"

int OnInit()
{   int k = 0;
    MessageBox( k );             // this call works
    k = Add( 1, 666 );
    MessageBox( k );             // Doesn't work

    return( INIT_SUCCEEDED );
    }
</code></pre>