Great class, thanks. I use ini files to store parameters of my NSoks, very handy.
What about x64 versions of the terminal? This class does not read data there.
Fredik:
What about x64 versions of the terminal? This class does not read data there.
Thanks for detecting the problem. A bug in the x64 loader has been detected and fixed. Please wait for the update and the class will work.
What about x64 versions of the terminal? This class does not read data there.
Bravo. A wonderful class. Much obliged.
A small remark.
It is necessary to insert a comment in the class declaration, right before the ReadFloat() function, that it understands the zero value only in the form of "0.00000000".
All values like "0", "0.0", etc. - it does not understand them correctly.
Super cool.
I had a lot of trouble with another library, and here it works in all parameters without any tricks.
By the way, after mql4 was tightened to mql5, the code works perfectly on MT4 as well
Thank you very much.
Wonderful class.
Thank you very much!
And how to get partition list (partition names) from ini file?
upd. Already found it myself:
MyIniFile.ReadSections(Strings); for(int i=0; i<Strings.Total(); i++) {Print(Strings.At(i));}

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
CIniFile class:
This class provides methods for working with Windows *.ini files. It has a standard interface with simple methods.
Using the library:
- Copy the IniFile.mqh file to the MQ5\Include\ folder.
- Declare the CIniFil class instance in the code (don't forget to add the #include <IniFile.mqh> directive).
- Call its Init method with file name as parameter.
- Call methods for reading/writeing/checking/deleting the data.
- If you need to work with data arrays, declare a CArrayString class instance.
A simple example of use of the library is contained in Test_CIniFile.mq5.Author: Henadiy E. Batohov