I have an application using INI files and the behavior does not seem to be identical when I map my INI files into the Registry as described at WritePrivateProfileString [MSDN], although the documentation says
the change in the storage location has no effect on the function's behavior.
What are the differences between an INI file on disk and an INI file mapped into Registry?
There are several differences:
GetPrivateProfileString()
overflows at 65536 bytes. This means that you can read 65535 characters from an ANSI file, but only 32767 characters from the Registry.Note that this list may be incomplete and change with new implementations from Microsoft. These tests were made on Windows 10 21H1.
All this should be enough to convince people to switch from INI files to other configuration file formats. This API is a relict from 16 Bit Windows and should not be used any more. Your config files needn't be XML, maybe JSON or YAML is good enough.