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.
this script is very usefull to Write and Read files not only in "experts/files" folder..
Is there anybody can translate the scripts comments in english?,
I'm not sure it is russian or ukrainian..
Please help,
TQ..
Code:
// _lopen : Откpывает указанный файл. Возвpащает: описатель файла. //Open the specified file. Return: file handle
// _lcreat : Создает указанный файл. Возвpащает: описатель файла. //Creates the specified file. Return: file handle
// _llseek : Устанавливает указатель в откpытом файле. Возвpащает: //Set the pointer in opened file. Retunn: new offset of the pointer.
// новое смещение указателя.
// _lread : Считывает из откpытого файла указанное число байт. //Reads from opened file the specified number of bytes Return number of readed bytes or 0 if the end of file
// Возвpащает: число считанных байт; 0 - если конец файла.
// _lwrite : Записывает данные из буфеpа в указанный файл. Возвpащает: // Writes the data in the specified file. Return number of writted bytes.
// число записанных байт.
// _lclose : Закpывает указанный файл. Возвpащает: 0. //Close specified file. Retunr 0
// В случае неуспешного завеpшения все функции возвращают значение // On error all function return HFILE_ERROR=-1.
// HFILE_ERROR=-1.
// path : Стpока, опpеделяющая путь и имя файла. // Path to the file.
// of : Способ открытия. //Open method
// attrib : 0 - чтение или запись; 1 - только чтение; 2 - невидимый или // 0-read and write. 1- only read, 2 - invisible, 3-system
// 3 - системный.
// handle : Файловый описатель. // File handle
// offset : Число байт, на котоpое пеpемещается указатель. // Number of bytes for moving pointer in file
// origin : Указывает начальную точку и напpавление пеpемещения: 0 - // Specifies start point and direction of movement in file
// впеpед от начала; 1 - с текущей позиции; 2 - назад от конца файла. // 0 - forward from beginning, 1 - from current position, 2 - backward from end of file
// buffer : Пpинимающий/записываемый буфеp. // buffer for reading/writing data
// bytes : Число считываемых байт. // number of bytes
// Способы открытия (параметр of): // open methods (parameter OF):
// int OF_READ =0; // Открыть файл только для чтения //0 - Open file for reading only
// int OF_WRITE =1; // Открыть файл только для записи //1 - open file for writing only
// int OF_READWRITE =2; // Открыть файл в режиме запись/чтение //2 - open file in read/write mode
// int OF_SHARE_COMPAT =3; // Открывает файл в режиме общего //3 - open file in shared mode.
// совместного доступа. В этом режиме любой процесс может открыть данный //In this mode any process can open the given file any quantity of times. At attempt to open this file in any other mode, function returns HFILE_ERROR.
// файл любое количество раз. При попытке открыть этот файл в любом другом
// режиме, функция возвращает HFILE_ERROR.
// int OF_SHARE_DENY_NONE =4; // Открывает файл в режиме общего доступа //4 - Opens a file in shared mode without an interdiction on read/write to other processes. At attempt of opening of the given file in mode OF_SHARE_COMPAT, function returns HFILE_ERROR.
// без запрета на чтение/запись другим процессам. При попытке открытия
// данного файла в режиме OF_SHARE_COMPAT, функция возвращает HFILE_ERROR.
// int OF_SHARE_DENY_READ =5; // Открывает файл в режиме общего доступа с //5 - Opens a file in shared mode with an interdiction for reading to other processes. At attempt of opening of the given file with flags OF_SHARE_COMPAT and-or OF_READ or OF_READWRITE, function returns HFILE_ERROR.
// запретом на чтение другим процессам. При попытке открытия данного файла
// с флагами OF_SHARE_COMPAT и/или OF_READ или OF_READWRITE, функция
// возвращает HFILE_ERROR.
// int OF_SHARE_DENY_WRITE=6; // Тоже самое, только с запретом на запись. //6 - Too most, only with an interdiction for write
// int OF_SHARE_EXCLUSIVE =7; // Запрет текущему и другим процессам на //7 - Interdiction current and to other processes on access to this file for read/write modes. The file in this mode can be opened only once (current process). All other attempts of opening of a file will be restricted.
// доступ к этому файлу в режимах чтения/записи. Файл в этом режиме можно
// открыть только один раз (текущим процессом). Все остальные попытки
// открытия файла будут провалены.