Create your own MetaTrader extension (dll) - page 4

 

Major DLL Problems

I'm having some major problems getting my own DLL to function.

I finally got it to the point where it can call the dll from within an EA, and it doesn't give me the 127 error. Unfortunately, every single time I get an exception.

I've attached the entire project, and the MT4 files.

If one of you programming gods could just take a quick look at it, I'd be very grateful!

[NOTE: Compiled on Visual Studio C++ Express 2008 Edition, running on Vista x64 Ultimate dual-core w/ 6GB RAM]

-Jason

Files:
dll_test.zip  1421 kb
 

creation .dll file with Dev-C++ Editor for Metatrader

Have somebody experience to create a .dll file with Dev-C++ that can be used for Metatarder.

When i trie it i think the .def file is not correct includet in the .dll file, and i become the error 127.

I have find a tutorial how I can create .dll file for Metatrader with Visual Studio, but not with the free version, in the free version there is no possibility to create MFC-Dll like in the tutorial I have see.

It would be helpfull for much people I think if anywhere is a tutorial how to create .dll files with the open source free editor Dev-C++ for use in Metatrader.

 

dev-C++ name mangling ...

Hi Tim,

When using dev-c++ the def file is generated for you automatically the problem is that you end up with function names that look like this :

EXPORTS

_Z11GetSMAArrayP8RateInfoiiPd@16 @ 1

_Z12GetHighValueP8RateInfoii = _Z12GetHighValueP8RateInfoii@12 @ 2

_Z12GetHighValueP8RateInfoii@12 @ 3

_Z13GetCloseValueP8RateInfoii = _Z13GetCloseValueP8RateInfoii@12 @ 4

_Z13GetCloseValueP8RateInfoii@12 @ 5

_Z11GetSMAArrayP8RateInfoiiPd = _Z11GetSMAArrayP8RateInfoiiPd@16 @ 6[/PHP]

Now you need to make sure you add the following check around your code

[PHP]

#ifdef __cplusplus

extern "C" {

#endif

#ifdef __cplusplus

}

#endif

Attached are the sample files I did for VS2008 but this time using dev-c++ ...

Hope this helps

 

Hello Mistigri,

thank you much for your good help.

The online video i have found was also your video.

I have trie your new example for dev-c++ editor, it works, thank you for your help to get till here.

Regards

Tim

 

Hello Patrick.

if i'm not wrong, you work with IBFX couple years ago... are you still with them now ? do you still collect ticks ?

Thanks for tutorial....it's the one i'm waiting for..

 

It's interesting to make external code with DLL. as far as i know it makes reverse engineering more difficult rather than ex4 files..

however, i would like to have chunk of codes that can be use to make http request or even directly connect to remote mysql... if any of you could provide or have information regarding the solution... please let me know...

 

NS2-32.dll

Hello guys!

I have a problem trying to use this library.

I put them in metatrader\experts\library

I correctly define the path for the .def file

... but my EA print on the register this error: -65495

What can be the problem?

And, most, how to solve it?

Is it possible that the .def file can be corrupted?

Thanks in advance...

 
veematics:
Hello Patrick.

if i'm not wrong, you work with IBFX couple years ago... are you still with them now ? do you still collect ticks ?

Thanks for tutorial....it's the one i'm waiting for..

Hi Veematics,

Sorry did not see your post till now :P

Yes I used to work with IBFX about two and half years ago, I do some consulting with them every once in a while.

I don't collect ticks anymore, it's too much work and I don't really have a use for it anymore

Patrick

 
fedecosta:
Hello guys!

I have a problem trying to use this library.

I put them in metatrader\experts\library

I correctly define the path for the .def file

... but my EA print on the register this error: -65495

What can be the problem?

And, most, how to solve it?

Is it possible that the .def file can be corrupted?

Thanks in advance...

Not sure, that library looks familiar, are you using that to connect to a website? Have you tried using wininet.lib instead?

I don't think the issue here is the def file or your dll would not even load and work properly ... If you can provide more info ( ie some piece of the code you're using in the dll ) then maybe I can try to help.

Patrick

 

I see you are big businessman???

This is not the forum where you can sell such shit you have.

What exactly did you modify in DGC OZFX EA

firedoji:
Easy!! Just download all the forex e-book and look at the instruction inside. I get over 200++ e-book from there and some EA too... All EA there are edited and modified...

-----------------------------------------

Download All EA Download All Indicator Download E-book
Reason: