Your experience seems to suggest that pre-existing CRLF are maintained. So if you truly need to have a blank line between sections, trying preformatting the file the way you like and then use WriteProfileString to see if the format is maintained. If so, then add the extra @CRLF when the file is created but not when you edit an existing file.
_________________________
Home page: http://www.kixhelp.com/hb/