OK im just trying to start myself calling DLL functions from within an EA.
So i have a tiny C# DLL called "mydll.dll" in the folder "/experts/libraries" which contains the code:
Then in the /experts/include folder i have a file called mydll.mqh which basically has:
All the above compiles properly and the EA compiles with the following calls to the above in the init() function:
So upon testing using strat tester i get the error:
Likely something basic im missing, but any help appreciated.
thx
So i have a tiny C# DLL called "mydll.dll" in the folder "/experts/libraries" which contains the code:
Inserted Code
namespace myDLL { public class Accounts { public bool getCalc(double pipCount) { if (pipCount > 20) return true; else return false; } } }
Then in the /experts/include folder i have a file called mydll.mqh which basically has:
Inserted Code
#import "mydll.dll" bool getCalc(double pipCount);
All the above compiles properly and the EA compiles with the following calls to the above in the init() function:
Inserted Code
#include <mydll.mqh> init() if (getCalc(50)) Print("====== DLL SUCCESS======");
So upon testing using strat tester i get the error:
Inserted Code
cannot call function 'getCalc' from dll 'mydll.dll' (error 127)
Likely something basic im missing, but any help appreciated.
thx