I think you would need to flush the file after doing your WritePrivateProfileStrings(), and then go back and open it using something like a CStdioFile to write the blank lines. You could also do it with a binary file, I don't know which would be easier. The point is that WritePrivateProfileString does not have an option to do this as far as I know. I have been using this function for a long time, and have never seen a way to do this wihtout manually writing to the file. I could be wrong. It's happened many times before. Good luck.