Hi stringo,
Thanks for your help - do you mean in VB? I'm a bit confused as to your specific meaning... Or, do you mean in the managed wrapper? Meaning
is wrong?
I'm confused, because the WinAPI functions are of course unmanaged functions... Can you elaborate? See declarations of WinAPI functions in what kind of file? C++, C#, VB?
Thanks again,
CS
Thanks for your help - do you mean in VB? I'm a bit confused as to your specific meaning... Or, do you mean in the managed wrapper? Meaning
MT4_EXPFUNC int __stdcall MultBy2(const int ipar) { int foo; MT4VBLib::MT4VBLib* pInteract = new MT4VBLib::MT4VBLib; foo = pInteract->VBMultBy2(ipar); return(foo); }
is wrong?
I'm confused, because the WinAPI functions are of course unmanaged functions... Can you elaborate? See declarations of WinAPI functions in what kind of file? C++, C#, VB?
Thanks again,
CS
Great !!!
SS Solutions deployed ability to execute .Net(C#) code from mql script
with data exchange gateway http://www.mttrade.net
simple and robust solution
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
I've been attempting to use a VB.NET library through a Managed C++ wrapper, and I'm having some issues. I could also use C#, but I'm assuming if it works for one, it will work for the other. I'm hoping that someone here can guide me. I read on the metaquotes.net forum that this was possible: http://www.metatrader4.com/forum/997/
1) IS it possible? - I'm assuming MT4 is unmanaged C++ code. It seems to be able to load the managed C++ wrapper OK, so logically I think it would work.
2) If it is possible, can someone help with the crashlog? I followed the instructions in 'How to Use Crashlogs to Debug Your Own DLLs', but the log I'm getting is obviously a bit more complicated due to the managed/unmanaged components.
Here is the log:
Here is my managed C++ wrapper (it is set to "used managed extensions", and is compiled with /clr, etc.)
and here is the vb file
As you can see - everything is extremely simple - nothing fancy. Just trying to validate the "flow" of this setup to get started.
Loading the managed C++ wrapper works fine. If I only use functions that are directly defined in that wrapper, it all works - so clearly MT4 CAN actually use a managed component. The problem comes when I try to use the function from the VB.NET dll.
I've verified that all of this stuff works outside of MT4 by using a simple console test app. Works great there... Please help! Your response is greatly appreciated.
Just for completeness, here is the test app that it works with: