Don't know, I use C++
Would you be interested in writing a C++ wrapper to call a VB.NET program? It would only have to have the minimum code needed to call the VB class. I want to read setting from an Access database in the VB portion of the code but I cannot seem to get MetaTrader to call the funtions within. I get the following error message:
cannot call function 'OpenDb' from dll 'readsetfile.dll' (error 127)
If you write a generic wrapper, I can manage the rest.
You would just have to document your C++ code so that I can add references in it as it relates to the main VB.NET module.
(As I to the VB.NET module, I may have to add some hook to the C++ wrapper - just guessing here).
Interested?
Thanks
There is a sample C-DLL in your experts/samples
MT4 DLL basics are not difficult.
Use standard calls
Use DEF file
If you don't have C compiler you can use VisualStudio Express (free)
There is a sample C-DLL in your experts/samples
MT4 DLL basics are not difficult.
Use standard calls
Use DEF file
If you don't have C compiler you can use VisualStudio Express (free)
I know but I do not know C so just one mistake and I will be spinning my wheels looking for a bug for days. I am a VB6 programming migrating to .NET so I can get by with VB.NET but I just need a C++ wrapper to get be by the tough times. Any way you could help with this generic wrapper. It would just have to call one of my VB.NET functions and I could learn how to modify it to call other functions.
I have no idea what would constitute a "generic C++ wrapper".
I last used BASIC in 1981.
Check new and robust solution http://www.mttrade.net
C# coding in mql4 script
Can someone tell me definitively if VB.NET can be used to write DLLs for MetaTrader?
Not definitive, but I think the answer is no. I'm not aware that Visual Studio lets you create common-or-garden Win32 DLLs using either VB.NET or C#. You can create COM-compatible class libraries, but not the sort of Win32 DLLs which can be used from MT4. AFAIK. Could be wrong.
[...] a C++ wrapper [...]
Life might not be quite this simple.
It's probably possible to do a C++ wrapper to a COM-compatible .NET class library in a few lines of code. But there may be a problem here. COM instantiation isn't lightning-fast, and nor is the COM-to-.NET bridge. And then you're opening a database, querying it, and closing it. And then releasing the COM object. All in a single call from the EA. Depending on the context, you may find that this is unacceptably slow in a real-life trading system. You might need a more complex wrapper which maintains state in memory between calls from the EA.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Can someone tell me definitively if VB.NET can be used to write DLLs for MetaTrader?
If so can someone post an example construct of a VB.NET class as MetaTrader would need it to be.
Thanks