Page 1 of 1
Unlimited size of Assotiation section
Posted: 2013-08-28, 00:38 UTC
by LonerD
From here:
http://www.ghisler.ch/board/viewtopic.php?t=35920
Do not cut [Associations] sections while editing associations.
[Associations] sections cutted not to 65535 bytes.
[Searches] section in TC is unlimited or can be very big (in my TC this section is above 200 Kb) and don't cutted while editing search templates in TD dialogues. So it made bypass restrictions ini-file?
Posted: 2013-08-28, 15:38 UTC
by ghisler(Author)
???
According to MSDN, all sections in ini files have a limit of 65535 bytes.
Posted: 2013-09-02, 01:17 UTC
by MarcinW
Well, this is true for TIniFile class, which uses GetPrivateProfileString and WritePrivateProfileString APIs. Microsoft
states that:
"If an application uses the standard Windows application program interface (API) calls to access the .INI files, the limit is 64K. Examples of these standard API calls are GetPrivateProfileString() and WritePrivateProfileString()."
There is a TMemIniFile class, that overrides this limitation - but it's unfortunately unavailable in Delphi 2. But maybe some code could be ported from Lazarus...
Posted: 2013-09-02, 05:28 UTC
by ts4242
ghisler(Author) wrote:???
According to MSDN, all sections in ini files have a limit of 65535 bytes.
This is OK for 9x based system but W2K, XP and later hasn't this limitation.
@
MarcinW
Please read Microsoft
states APPLIES TO

Posted: 2013-09-02, 10:28 UTC
by MarcinW
ts4242 wrote:Please read Microsoft
states APPLIES TO :lol:
Wow :) Unfortunately, the limitation is still there, according to the documentation of parameters for
WritePrivateProfileSection function.
Regards
Posted: 2013-09-02, 13:17 UTC
by ghisler(Author)
I'm sticking to the official API because ini files can be redirected to the registry - and then reading the file directly would fail.