Forex
Google

Go Back   Forex Trading > Downloads > Tools and utilities
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack (4) Thread Tools Display Modes
  #11 (permalink)  
Old 11-25-2005, 11:10 PM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Talking Updated!

Quote:
Originally Posted by sx ted
CodersGuru, thank u super, have u got equivalent of FileTell()
sx ted,

I've updated the program. Now it includes these functions:

int gFileOpen(string file_name,int mode);
bool gFileWrite(int handle,string data);
bool gFileClose(int handle);
string gFileRead(int handle,int length=0);
void gFileSeek(int handle,int offset, int mode);
bool gFileDelete(string file_name);
int gFileSize(int handle);
int gFileTell(int handle);
bool gFileFlush(int handle);
bool gFileCopy(string source,string distance,bool IfExists);
bool gFileMove(string source,string distance);

I hope you enjoy it.
Attached Files
File Type: zip mtguru1.zip (87.8 KB, 296 views)
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 11-26-2005, 12:13 PM
gnrslash gnrslash is offline
Junior Member
 
Join Date: Nov 2005
Posts: 7
gnrslash is on a distinguished road
dll import problems

Hi guys,
I see you by your words you're very good with these things
and I hope you can give me a hand with my dll import problem.
I did exactly as codersguru explained with the filehandler dll.
I have the .ex4 file in the indicators directory. In the .ex4 there's an include to a file(.mqh) in the include directory which has an #import statement within to a dll in the libraries directory.
Dll is loaded but as soon as i drag the indicator in the chart I read in the expert tab of strategy builder: cannot call function functionname from dll ' dllname.dll'
I tested the dll from an .exe and all the function are running but within the .ex4 i can't find a way.I'm sure I'm missing something but I really don't know what. what could it be?
Thank you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 11-26-2005, 12:23 PM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Arrow There's something wrong in dll code.

Quote:
Originally Posted by gnrslash
Hi guys,
I see you by your words you're very good with these things
and I hope you can give me a hand with my dll import problem.
I did exactly as codersguru explained with the filehandler dll.
I have the .ex4 file in the indicators directory. In the .ex4 there's an include to a file(.mqh) in the include directory which has an #import statement within to a dll in the libraries directory.
Dll is loaded but as soon as i drag the indicator in the chart I read in the expert tab of strategy builder: cannot call function functionname from dll ' dllname.dll'
I tested the dll from an .exe and all the function are running but within the .ex4 i can't find a way.I'm sure I'm missing something but I really don't know what. what could it be?
Thank you
gnrslash,

If you enbabled "Allow DLL Import" option and still getting the message "cannot call function functionname from dll dllname.dll" it means there's something wrong in dll code.

Could I see the source code of the dll?
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 11-26-2005, 12:28 PM
gnrslash gnrslash is offline
Junior Member
 
Join Date: Nov 2005
Posts: 7
gnrslash is on a distinguished road
Sure.

Sure you can.
btw the "Allow dll import is checked"
Where can i send you?
Pm your email if you want
Thank you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 11-26-2005, 12:34 PM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Arrow

Quote:
Originally Posted by gnrslash
Sure you can.
btw the "Allow dll import is checked"
Where can i send you?
Pm your email if you want
Thank you
codersguru at gmail
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 11-26-2005, 12:43 PM
gnrslash gnrslash is offline
Junior Member
 
Join Date: Nov 2005
Posts: 7
gnrslash is on a distinguished road
Quote:
Originally Posted by codersguru
codersguru at gmail
email sent. Thank you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 11-26-2005, 12:50 PM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Arrow You're welcome!

Quote:
Originally Posted by gnrslash
email sent. Thank you
You're welcome!
Received and I'll check it.
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18 (permalink)  
Old 11-26-2005, 01:54 PM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Lightbulb Visual basic dosen't create a standard dll.

Quote:
Originally Posted by gnrslash
email sent. Thank you
gnrslash,

The problem is Visual basic dosen't create a standard dll.

Please review this article:
http://www.vb-helper.com/howto_make_standard_dll.html

I've made the dll for you and I'll send it to your email now (I didn't test it yet in MQL4, please test it and tell me the result).
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19 (permalink)  
Old 11-26-2005, 01:57 PM
gnrslash gnrslash is offline
Junior Member
 
Join Date: Nov 2005
Posts: 7
gnrslash is on a distinguished road
Quote:
Originally Posted by codersguru
gnrslash,

The problem is Visual basic dosen't create a standard dll.

Please review this article:
http://www.vb-helper.com/howto_make_standard_dll.html

I've made the dll for you and I'll send it to your email now (I didn't test it yet in MQL4, please test it and tell me the result).
I'd have bet something like this.
anyway, I didn't receive your email. I guess mail server blocks that kind of attachment. try to zip and resend. thank you again
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20 (permalink)  
Old 11-26-2005, 02:13 PM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Unhappy gmail attachment problem.

Quote:
Originally Posted by gnrslash
I'd have bet something like this.
anyway, I didn't receive your email. I guess mail server blocks that kind of attachment. try to zip and resend. thank you again
Check your mail, if have not got them could I upload the dll and the visual basic calling example here?
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


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

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

LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/tools-utilities/386-mt4-files-functions-replacement.html
Posted By For Type Date
File functions - Part 1 This thread Refback 03-05-2008 01:29 PM
MT4编程学习教程! - MT4系统交易 - 外汇牛人邦 飞狐免费外汇行情接收!飞狐外汇接口! - Powered by Discuz! This thread Refback 01-11-2008 05:45 PM
Mql - Metatrader Development Course This thread Refback 07-19-2007 02:50 AM
File functions - Part 1 | www.metatrader.info This thread Refback 06-21-2007 06:21 PM

Similar Threads
Thread Thread Starter Forum Replies Last Post
File Functions intelligent_14 Questions 6 07-11-2006 08:37 PM
Unusual Functions intelligent_14 Questions 3 06-23-2006 11:20 PM
Appendix 2 - Trading functions codersguru Lessons 8 12-26-2005 01:46 PM
Lesson 7 - Functions codersguru Lessons 2 11-02-2005 03:32 PM


All times are GMT. The time now is 12:29 PM.