Re: TRegistry.WriteString. Character limit?
From: Ndi (Ndi_at_Ndi_dot_ro)
Date: 12/18/03
- Next message: Ndi: "Re: How to clear Windows file cache"
- Previous message: Kurt Barthelmess: "Re: TRegistry.WriteString. Character limit?"
- In reply to: Kurt Barthelmess: "Re: TRegistry.WriteString. Character limit?"
- Next in thread: Ben Hochstrasser [FF]: "Re: TRegistry.WriteString. Character limit?"
- Reply: Ben Hochstrasser [FF]: "Re: TRegistry.WriteString. Character limit?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 18 Dec 2003 04:32:54 +0200
> >Does anyone out there know if there is a limit to the length of a string
the
> >Windows Registry can handle?
Depends on the OS.
If data is quite large I suggest you write it to a file and just store the
path to it. True, MS suggests to storing under 2k but commercial apps store
tons, some up to 500k in a single key+subkeys.
Also note that even though it explicitly recommends up to 2k, it also
recommends not storing :objects such as icons: for performance reasons. An
icon typically has 800 bytes. So the message is "Keep it down".
Quote:
Platform SDK: Windows System Information
Registry Element Size Limits
The following are the size limits for the various registry elements.
a.. The maximum size of a key name is 255 characters.
b.. The maximum size of a value name is as follows:
a.. Windows XP, Windows .NET Server: 16383 characters
b.. Windows 2000: 260 ANSI characters or 16383 Unicode characters.
c.. Windows 95/98/Me: 255 characters
c.. Long values (more than 2048 bytes) should be stored as files with the
file names stored in the registry. This helps the registry perform
efficiently. The maximum size of a value is as follows:
a.. Windows NT/2000/XP: Available memory.
b.. Windows 95/98/Me: 16,300 bytes. There is a 64K limit for the total
size of all values of a key.
-- Andrei "Ndi" Dobrin Brainbench MVP www.Brainbench.com
- Next message: Ndi: "Re: How to clear Windows file cache"
- Previous message: Kurt Barthelmess: "Re: TRegistry.WriteString. Character limit?"
- In reply to: Kurt Barthelmess: "Re: TRegistry.WriteString. Character limit?"
- Next in thread: Ben Hochstrasser [FF]: "Re: TRegistry.WriteString. Character limit?"
- Reply: Ben Hochstrasser [FF]: "Re: TRegistry.WriteString. Character limit?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|