Forex



Go Back   Forex Trading > Training > Metatrader > Metatrader 4 mql 4 - Development course
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #51 (permalink)  
Old 04-27-2009, 04:12 PM
Mistigri's Avatar
Member
 
Join Date: Mar 2006
Posts: 34
Mistigri is on a distinguished road
Quote:
Originally Posted by fedecosta View Post
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...
Hi Fedecosta,

Try to copy the def file directly under your c:\ drive ... That seems to work for me.
Note that this has nothing to do with DLL programming, it's specific to this EA...

Patrick

Last edited by Mistigri; 04-27-2009 at 04:18 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #52 (permalink)  
Old 05-02-2009, 09:47 AM
Member
 
Join Date: Jul 2008
Posts: 48
chiwing is on a distinguished road
Quote:
Originally Posted by Mistigri View Post
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 :

PHP Code:
EXPORTS
    _Z11GetSMAArrayP8RateInfoiiPd
@16 1
    _Z12GetHighValueP8RateInfoii 
_Z12GetHighValueP8RateInfoii@12 2
    _Z12GetHighValueP8RateInfoii
@12 3
    _Z13GetCloseValueP8RateInfoii 
_Z13GetCloseValueP8RateInfoii@12 4
    _Z13GetCloseValueP8RateInfoii
@12 5
    _Z11GetSMAArrayP8RateInfoiiPd 
_Z11GetSMAArrayP8RateInfoiiPd@16 
Now you need to make sure you add the following check around your code

PHP Code:
#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
do u mean that when write dll file,
the function in the def file should add _z12 at the begin?

that means in .mq4 file
call finction: get_max_deviation

then in .def file
the transfered function : _z12get_max_deviation???

what means for the @ number after the function name

thanks

Last edited by chiwing; 05-02-2009 at 10:00 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #53 (permalink)  
Old 05-02-2009, 12:57 PM
Member
 
Join Date: Jul 2008
Posts: 48
chiwing is on a distinguished road
Quote:
Originally Posted by Mistigri View Post
Attached are the sample files I did for VS2008 but this time using dev-c++ ...
Hope this helps
Attached Files
MistigriFX Sample Debug.mq4 (2.1 KB, 15 views)
MSFXDEV.zip (8.6 KB, 17 views )

I have dl your files , and compile the .cpp by the picture show
but occur error

do my compile method wrong , how do i compile it to dll ? (i am a c++ beginner ^^)
Attached Images
File Type: jpg dev_DLL.jpg (297.7 KB, 214 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #54 (permalink)  
Old 05-08-2009, 04:26 AM
Member
 
Join Date: May 2006
Posts: 43
veematics is on a distinguished road
DLL with shared function

Hello All and Mistigri,
i would like to know how to create shared function so that i don't have to copy-paste the functions on each DLL...

it's equals method if i use mqh (libraries)...but in DLL format


I use Visual Studio as well
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #55 (permalink)  
Old 05-12-2009, 06:20 AM
Member
 
Join Date: May 2006
Posts: 43
veematics is on a distinguished road
Convert shared MFC to static, is it possible

I just notice that the DLL i made is a shared MFC, that is why it return error(126) in other computer while there's no problem with my computer.

I would like to know on how to convert shared MFC to static linked ?
because when i set it to static it display error like this:
error LNK2019: unresolved external symbol ...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #56 (permalink)  
Old 05-12-2009, 08:25 AM
wolfe's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 818
wolfe is on a distinguished road
Quote:
Originally Posted by veematics View Post
I just notice that the DLL i made is a shared MFC, that is why it return error(126) in other computer while there's no problem with my computer.

I would like to know on how to convert shared MFC to static linked ?
because when i set it to static it display error like this:
error LNK2019: unresolved external symbol ...
Make sure on other computer, you load the compiled release version, and not the debug version.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #57 (permalink)  
Old 06-10-2009, 05:28 AM
Member
 
Join Date: May 2006
Posts: 43
veematics is on a distinguished road
HELP: BUG with DLL

Hello, i create a dll that write a file to specific directory with fprintf function, the bug happen when i run mt4 from desktop's shortcut .. it crashed the mt4, but if i run mt4 directly from windows explorer everything works perfectly.


Any idea how to solve this problem... needs help !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #58 (permalink)  
Old 06-16-2009, 07:29 AM
Member
 
Join Date: May 2006
Posts: 43
veematics is on a distinguished road
wolfe.. could you show me how to release compiled version.. not debug version ?? .. i'm on visual studio
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #59 (permalink)  
Old 06-21-2009, 01:10 PM
Junior Member
 
Join Date: Feb 2009
Posts: 1
Bobtrade is on a distinguished road
Tnx for the DLL courses

Hi ,

This is my first post ever on this forum. Hope I'm doing it the right way.

Just want to say Thank You for explaining about DLL 's.
I can handle basic mql4 but know nothing about dll development.

So, tnx again and I'l be back

cheers,
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #60 (permalink)  
Old 06-21-2009, 06:52 PM
wolfe's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 818
wolfe is on a distinguished road
Quote:
Originally Posted by veematics View Post
wolfe.. could you show me how to release compiled version.. not debug version ?? .. i'm on visual studio
I'm using VS2008 Express. There should be a tab at the top of your VS compiler that allows you to select between debug and release. Select release and compile. The compiler will give you a file path where your release dll is stored. Follow the file path, and copy the dll to C:\WINDOWS\system32.

That should work.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
c# metatrader, dll, dll forex, dll metatrader, dll mt4, ExpertSample.dll, file, FILE EXTENSION EX4, forex, internet, metatrader, metatrader c# DLL, metatrader dll, metatrader socket, metatrader sockets, MistigriFX, mql dll, mt4 dll


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I use the files with .ex4 extension. NEEL123 General Discussion 6 12-19-2008 09:35 AM
About Fibo extension phildunn General Discussion 11 03-30-2008 01:31 PM
there is any script/program to create walk forward test data for metatrader???? giraia_br Metatrader 4 1 03-26-2007 01:44 AM
Please create an EA matrixebiz Expert Advisors - Metatrader 4 0 11-28-2006 08:19 PM


All times are GMT. The time now is 12:51 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.