#import "kernel32.dll" bool WritePrivateProfileStringW(string lpSectionName, string lpKeyName, string lpString, string lpFileName); int GetPrivateProfileStringW(string lpApplicationName, string lpKeyName, string lpDefault, string lpReturnedString, int nSize, string lpFileName); #import
i would prefer to use
int GetPrivateProfileSectionW(string lpAppName, string lpReturnedString, int nSize, string lpFileName);
or maybe
int GetPrivateProfileSectionW(string lpAppName, char& lpReturnedString[], int nSize, string lpFileName);
because you have to deal with a terminator
for(int x = 0; x <= ArraySize(buffer); x++) { if (buffer[x] == 0) { buffer[x] = '\n'; } } for(int y = 0; y <= ArraySize(buffer); y++) { if (buffer[y] == '\n' && buffer[y+1] != '\n') { for(int z = y; z <= ArraySize(buffer) - y; z++) { buffer[z] = buffer[z+1]; } } } string str_res = CharArrayToString(buffer); Print("Output=",str_res, ", Bytes Read=",read);

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
The above code is producing undesirable output:
Output=3, Bytes Read=1
the declaration is as follows:
How do i use this function properly GetPrivateProfileStringW anyone to help?