Re: Writing Text Files to the Registry with Delphi
Posted by webmaster Guido on March 10, 2001 at 17:10:18:
In Reply to: Writing Text Files to the Registry with Delphi posted by Jeff on March 09, 2001 at 23:13:10:
: I am wonderig if you can write an entire text file to the Registry and then be able to open and read the file from the registry? If so, what is the code to do this?
Just a rough setup: you could create numbered keys in the Registry for each line of your text and put the textline in it; to read back, read the numbered keys until you can't find any more keys.
But I advise strongly against this, because you are dumping stuff in the Registry, that will not be removed when your Delphi program is removed from the PC. Even if you "uninstall" the program, this data will stay in the Registry, because at the time of installation these changes were not recorded in some uninstall-logfile. As the registry is getting more and more data, Windows can slow down considerably.
It's best to save text data in an ini-file or any other kind of text-file, located in your program's directory.