and I am compiling /clr, other than what I've mentioned here, I have left the code from the sample .dll untouched.
What is the problem?
BW
BW
Gee, I guess none of the moderators want to help me out...I just love all of the
support provided for MQL.
BW
BW
RickD,
Thanks for the reply...seriously. I don't think this is it, though, because I've seen numerous .dll's that call windows functions...including one that calls the MessageBox. Luckily I've found a gentleman over at forex-tsd who has successfully compiled .dll for MT4 with Visual Studio 2005 who is willing to help me out a bit.
Do you have any other ideas?
Again, thank you very much for the reply.
BW
Thanks for the reply...seriously. I don't think this is it, though, because I've seen numerous .dll's that call windows functions...including one that calls the MessageBox. Luckily I've found a gentleman over at forex-tsd who has successfully compiled .dll for MT4 with Visual Studio 2005 who is willing to help me out a bit.
Do you have any other ideas?
Again, thank you very much for the reply.
BW
RickD,
I've been told this might be the problem. Visual Studio 2005 EE won't generate the .def file for me (as far as I can tell). So I may have to do it manually. I didn't think this should make a difference, because aren't the functions declared for MQL in the .mqh include file? I will definitely be giving it a try, though. Also, do you know where the .def fits into the whole process for MQL? My understanding here is a little fuzzy. Thank you for your help.
BW
I've been told this might be the problem. Visual Studio 2005 EE won't generate the .def file for me (as far as I can tell). So I may have to do it manually. I didn't think this should make a difference, because aren't the functions declared for MQL in the .mqh include file? I will definitely be giving it a try, though. Also, do you know where the .def fits into the whole process for MQL? My understanding here is a little fuzzy. Thank you for your help.
BW
richplank:
There is the "allow DDL imports" tick-box in the expert settings, but you're probably aware of that one; I just mention it because it was something I overlooked when I briefly played with DLL's.
Rich,There is the "allow DDL imports" tick-box in the expert settings, but you're probably aware of that one; I just mention it because it was something I overlooked when I briefly played with DLL's.
This is easy to overlook :) I WISH it were the problem. Thank you.
BW
bwilhiteforex
I also tried to write a dll using C# and I faild. my code was as simple as this one:
I also tried to write a dll using C# and I faild. my code was as simple as this one:
using System;
using System.Collections.Generic;
using System.Text;
namespace MYLib{
public class Class1
{
double Getb(){
return(5);}
}
}
I think the problem must be from the way .NET framework is orgnizing its namespoaces.
before .NET, functions were directly exposed. but now, they are hidden in shields
of namespaces and classes. I think MQL can not distinguish them. Please tell us
if .def file has helped you.
regards
I'm very interested in this as well.
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'm trying to write a .dll to use and I've hit a problem. I took the sample .dll provided and added this function:
MT4_EXPFUNC void __stdcall Hello()
{
System::Windows::Forms::MessageBox::Show("Hello from MT4!");
}
I can get the .dll to compile just fine...I can even get MQL to find it, although I had to give the complete path in the include file, the script will even attempt to call the function, but fails at the call. The log message is:
2006.12.02 09:06:07 MT4toDLLTestHelloWorld USDJPYm,Daily: loaded successfully
2006.12.02 09:06:15 MT4toDLLTestHelloWorld USDJPYm,Daily: cannot call function 'Hello' from dll 'C:\Program Files\Interbank FX Trader 4\experts\libraries\CompileSampleDLL. dll' (error 127)
2006.12.02 09:06:15 MT4toDLLTestHelloWorld USDJPYm,Daily: expert stopped
I have this directive at the top of my .dll:
#using <system.windows.forms.dll>
and I am compiling /clr, other than what I've mentioned here, I have left the code from the sample .dll untouched.
What is the problem?
BW