tinashe: anyone with a suggestion
Per File Operations via WinAPI - MQL4 Articles I suggest you make sure ReturnedString is at least 255 characters long, before calling GPPS
string ReturnedString =""; int nValue = GetPrivateProfileStringA(SectionName, KeyName, Default, ReturnedString, 255, FileName);
Well i just tried to make sure the size of the string is 255 all spaces and the return value is blank. it returns only the 255 spaces. but the return value nValue if greater than 0.
Any other easy solution i can use, i never thought it will be this hard to read an ini file
Well I managed to make it work, all i needed to do was make sure the initial value of the string is "x "; x followed by lots of spaces, spacess alone it doesn't work. eish very strange indeed.

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
GetPrivateProfileStringA
here is what is happening exactly documented here: https://www.mql5.com/en/forum/56876
in the code below: when the function is called for the second time: the line 1.Returned String= contains a value from the previous call its strange... anyone with a suggestion all i want is to read an ini file.