5 posts in this topic

m00 1

When I open the ini file, it has all of the information, in the correct section, with the correct key, but when I try to read it out of the ini file, it only returns the first line of that key.

I suspect that it is a formatting issue; I may need to manipulate the text being sent to the ini file so that it fits on one line (lf or cr or something), but I am not sure if that is right, and if it is, I am not sure how to do it.

Share this post

Link to post

Share on other sites

m00 1

New Line is the terminator for the key value, so it is truncating there when reading back.

There is also around 255 character limit.

A suggestion is to replace the new line character with a pipe (|) or other character before writing and do the reverse when reading back.

OK, I thought that may be the case with the new line ending a key value.

What has the 255 char limit? The ini value?

Replacing the new line char with a pipe sounds great, but I don't know how to do it. I can't find documentation on what a multiple line input box does to text and/or don't quite understand how to add/swap a character instead of a new line.

Share this post

Link to post

Share on other sites

DaRam 1

OK, I thought that may be the case with the new line ending a key value.

What has the 255 char limit? The ini value?

Replacing the new line char with a pipe sounds great, but I don't know how to do it. I can't find documentation on what a multiple line input box does to text and/or don't quite understand how to add/swap a character instead of a new line.

Yes the value. Has to do with the buffer size used when calling the "GetPrivateProfileString" Windows API.