İptal Edildi

Delphi: Save a registry key to .reg file

Develop in Delphi 2010 (or compatible), the following two functions:

Function ExportRegistryKey(const Root : HKEY; const Key: String; var Output : TStringList; const QuitOnError : Boolean = True) : Integer;

Function ExportRegistryEntry(const Root : HKEY; const Key: String; const EntryName : String; var Output : TStringList) : Integer;

ExportRegistryKey saves the contents of the given registry key, including any possible sub-keys, to the given Output StringList in a format of a Windows .reg file. If QuitOnError = False, the function saves all the possible data to the Output list, ignoring any possible errors that occur while iterating and reading the registry.

ExportRegistryEntry saves the name and value of the given registry entry to the given Output stringlist using the Windows .reg file format.

The functions must be implemented using Windows API (you are not allowed to use the TRegistry or the Registry unit of Delphi), and must support the saving of all the known registry data types. If you need to write any helper functions, feel free to do so.

In a case of error, the functions must return an error code. If the function runs without any error, it must return 0. The functions can assume that given Output Stringlist exists and that it already contains the necessary header information of the .reg file. However, the functions must not assume that the given Output Stringlist is empty. It may (or may not) contain data added there by previous ExportRegistryKey/Entry function calls.

You can use Windows [url removed, login to view]'s File > Export feature for examples how .reg files are generated. If QuitOnError is True, the function quits in a case of error in reading the data. If one would call e.g. ExportRegistryKey on registry key "hkey_local_machine\software\foobar\" and use RegEdit's File > Export ... feature on the same key, the resulting .reg file's content should match the Output StringList generated by the ExportRegistryKey call.

Beceriler: Delphi

Daha fazlasını görün: export registry delphi, delphi registry, delphi registry sub keys, delphi tregistry, types data entry software, types data entry errors, one key data, hkey, delphi develop, data key entry, data entry helper, write contents, key information, api key, windows helper, delphi files, function delphi, registry key already exists, string reg, reading header file, save file name, delphi export, delphi string contains, key code delphi, api registry functions

İşveren Hakkında:
( 588 değerlendirme ) Turku, Thailand

Proje NO: #4444826

2 freelancer bu iş için ortalamada 130$ teklif veriyor


I'm a Delphi expert, and can do this project easily.

in 5 gün içinde110$ USD
(41 Değerlendirme)

Hi! I can make it! I've done a similar project and ready to provide demo.

in 3 gün içinde150$ USD
(15 Değerlendirme)