| / | Forum |
|
abiank
2007.12.03 15:01
Hello all (but most importantly Slawa :)
I am trying to use a dll in an EA, but i get the following error when i try to access its first function: 12:51:17 DllTest DAX,H1: loaded successfully 12:52:01 DllTest DAX,H1: cannot call function 'isInitialized' from dll 'test28. dll' (error 127) 12:52:01 DllTest DAX,H1: expert stopped unfortunately i couldnt find any description of this error 127. Can You help? Thanks in advance.. |
|
Interview with Harry Brinkhuis To my findings a Take Profit of 42 and a Stop Loss of 84 is the right combination for Phoenix. They are part of what I call the balance between settings, timeframe, Stop Loss and Take Profit. Other people that were testing Phoenix tried to change Take Profit and Stop Loss and got very different results. They somehow changed "The Balance"! |
5089 |
stringo
2007.12.03 15:29
Use search, please. http://forum.mql4.com/search/error%20127 You need to include def-file to your dll-project |
|
abiank
2007.12.03 20:02
OOps, my bad. thank You!
|
|
abiank
2007.12.03 20:46
I have created a .def file and put it into experts\libraries, but the problem persists.
what am i doing wrong? should I put it somewhere else? or is the format wrong?
LIBRARY dlltest.dll EXPORTS bumpStepSizes createNetwork is what I am using, should I use decorated names? such as createNetwork@2 etc etc? Thanks. |
|
abiank
2007.12.04 01:49
ok i figured it out, me very stupid :)
|
|
axmf
2007.12.04 09:03
Exported functions for MT4 created in Visual must be declared as _stdcall, not as _cdecl, which is the standard-declaration of functions in Visual !
|
|
netconuk
2009.07.20 08:07
I'm having the same problem using VB. I've copied my DLL file over. Do I need anything else? -Jerry |
|
tm20
2010.02.20 23:30
Hi Jerry, If you have created your dll, and not added a DEF file for the function Exports, the names of the functions will be Mangled ... like DoMail() may look like _DoMail@12. Either add a def file, naming your exports, the file is really simple and looks like the stuff below. LIBRARY "mqlmail" EXPORTS DoMail TDoSomething Now you can use the unmangled function names. If you want to use the mangled names and not add a DEF file you can use the Visual Studio Command Prompt Window with 'dumpbin /exports "MQLMail.dll"' to find the mangled names you have to use in your indicator / expert. Let me know if this helps, Thanks T |
|
7bit
2010.02.21 00:58
The .def file is for the linker when building the dll, not for metatrader. Alternatively you could abandon the use of this ancient C++ entirely and use appropriate and modern language and tools for creating dlls like for example Delphi or FPC/Lazarus. This would save you a lot of headache since everything will be much more intuitive and less error prone. |