profile.c (kernel32): API broken

Paul Vriens at
Thu Aug 6 02:38:34 CDT 2009

Claudio Fontana wrote:
> Just a reminder to everyone involved with profile.c:
> I have watched the git log of the somewhat recent changes to kernel32/profile.c.
> The profile API does not work that way.
> The current situation is even worse than before, when the undocumented
> empty string section and empty keys were not implemented at all.
> The current situation leads to consistent INI file corruption when the
> applications use the undocumented empty string section and empty keys.
> I tried to explain how the API works under Windows many times. This is
> another casual attempt at giving you a reality check.
> If you are interested, you can contact me for further details, or look
> at the testcases in my last patch (search for profile.c / Claudio
> Fontana).

Found your patch from 2006 and tested on some Windows boxes.

The WritePrivateProfileStringA crashes on Windows 2003 for both added 
tests. Windows 98 doesn't crash btw.

Both your fixes to the implementation seem to be for reading the ini 
file. Could you rewrite the test case so it succeeds on all platforms?

So, for example creating the ini file with the empty section/key 
'manually' and then trying to read (again on several platforms).



More information about the wine-devel mailing list