On Tue, 27 May 2003, Thomas Charbonnel wrote:
Hi,
This fixes a crash in WritePrivateProfileString when the lpFileName parameter was NULL. The behaviour is modeled after what I tested on Windows machines: 9x/Me returns FALSE and nothing is done, NT/2K/XP attempts to write the entry in the win.ini file and returns the appropriate value.
I think it's way too complicated for no good reason. Just do what NT does:
if (!filename) filename = wininiW;
It's just one line vs. 10+.