|
|||||||
| 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 |
|
![]() |
|
|
LinkBack (4) | Thread Tools | Display Modes |
|
|||
|
Well, I haven't tested it. But if it works..that is AWESOME!!
I checked out the demo .mq4 file, and it is so simple and elegant. Good work. The only issue I have is what to do about new lines. How do I use gFile to write a new line? Last edited by fivewhy : 11-21-2005 at 01:58 PM. |
|
||||
|
Quote:
Thank you very much for your comment. ![]() I think the new line printing issue needs some work from me, Thanks for the notice. |
|
||||
|
well done
, but file functions (as well as many other) may be used directly from windows API dlls.example of file copy function import: #import "Kernel32.dll" bool CopyFileA (string source_file, string destination_file, bool if_exist); with DLLs you can do a lot of things, like SQL database access and so on. |
|
||||
|
Quote:
That's right , but could you give me .mql demo shows me how to use the kernel32 functions CreateFile, OpenFile,WriteFile and ReadFile in MQL4Code:
HANDLE CreateFile( LPCTSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile ); HFILE OpenFile( LPCSTR lpFileName, LPOFSTRUCT lpReOpenBuff, UINT uStyle ); BOOL WriteFile( HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite, LPDWORD lpNumberOfBytesWritten, LPOVERLAPPED lpOverlapped ); BOOL ReadFile( HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped ); |
|
||||
|
gFiles.mqh
Quote:
I'm sorry, I meant "gFiles.mqh" ![]() To run FilesDemo: 1- Extract the "mtguru1.dll" to "MetaTrader 4\experts\libraries" path. 2- Extract "FilesDemo.mq4" to "MetaTrader 4\experts\indicators" path and compile it. 3- Extract "gFiles.mqh" to "MetaTrader 4\experts\include". 4- Load FilesDemo from your Indicators - don't forget to enbable "Allow DLL Import" |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |