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?
Unlimited size of Assotiation section
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50567
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
???
According to MSDN, all sections in ini files have a limit of 65535 bytes.
According to MSDN, all sections in ini files have a limit of 65535 bytes.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
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...
"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...
This is OK for 9x based system but W2K, XP and later hasn't this limitation.ghisler(Author) wrote:???
According to MSDN, all sections in ini files have a limit of 65535 bytes.
@MarcinW
Please read Microsoft states APPLIES TO

Wow :) Unfortunately, the limitation is still there, according to the documentation of parameters for WritePrivateProfileSection function.ts4242 wrote:Please read Microsoft states APPLIES TO :lol:
Regards
- ghisler(Author)
- Site Admin
- Posts: 50567
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I'm sticking to the official API because ini files can be redirected to the registry - and then reading the file directly would fail.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com