Unlimited size of Assotiation section

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka, Russia
Contact:

Unlimited size of Assotiation section

Post 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?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48125
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

???
According to MSDN, all sections in ini files have a limit of 65535 bytes.
Author of Total Commander
https://www.ghisler.com
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post 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...
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post 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 :lol:
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post 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
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48125
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post 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.
Author of Total Commander
https://www.ghisler.com
Post Reply