Using Synapse dll from MT4 on MQL, How to use deployed dll from MetaTrader 4
Hi, thank you for your reply!
I have a try with one application called DLL Export Viewer but it shows nothing. So I conclude that no functions are exported at all that is why I can not call them. It makes sense.
I have a tutorial how to use my dll maked from the vendor but it is for regular .NET components not for MQL. Here is the .NET syntax:
using Peltarion.Deployed; using Peltarion.Maths;
public partial class Police : Form { GoodCopBadCop sys = new GoodCopBadCop(); //<---Add public Police() { InitializeComponent(); InitializeFields(); }
private bool FailEvaluation(int age,…) { sys.Set_CSV(age, avgg, chdn, exed, cr, sex, sece, 0, 0, 0); sys.StepEpoch(); // Step one epoch Matrix o = sys.Output_Port0; // Get the output return o[0] < o[1]; // Return true if pass < fail }
This is how they use the dll from .NET application but this does not work for MQL. I think the dll functions should be exported somehow to be used in MQL may be with another dll using C++. Am i right?
I start as described bellow:
#import "XXX.dll"
void StepEpoch(); // Step one epoch
#import
this is OK because I get no error importing the dll. But when I try to make a call to StepEpoch() it say that the function is not presented in the dll. Why is that?
this is what I use:
void OnStart()
{
//---
StepEpoch();
}
So I conclude the functions are called somehow else but how? Can You please describe how?
Thank You and I hope we create useful tutorial here because such does not exist.