🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #15021

What's the best way to set data in Registry?

#15021
From: Phuoc Can HUA
Date: Tue, 22 Jul 2003 06:37
20 lines
1806 bytes
Currently, my program is writing some settings to the registry. It's 
checking whether a entry exists and trying to read the previously stored 
values. If not found, a new entry with default value will be inserted. 
Since I don't want to check each single entry I put all in one try{} and as 
soon as one fails then it goes to the block for default values. The problem 
is whenever a new version has a new parameter then it will reset all the 
settings in the first run :-(

Does anyone has an elegant routine which reads the registry information 
from a file? and it inserts the default value if required, i.e. not 
touching existing parameters.


thanks
Phuoc Can HUA

-- 
_/\__/\__/\__/\__/\__/\_
www.huaonline.com
My Homepage is my Castle
Technical Details
Message-ID: <oprso8ohk2bq7az6@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!sjc72.webusenet.com!news.webusenet.com!wn14feed!worldnet.att.net!216.166.71.14!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,c19edcb7bdc4d9c7,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-07-22 00:03:17 PST
Content-Type: text/plain; charset=iso-8859-15; format=flowed
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: What's the best way to set data in Registry?
From: Phuoc Can HUA <home}a+t{huaonline.com>
MIME-Version: 1.0
Date: Tue, 22 Jul 2003 16:37:19 +1000
Message-ID: <oprso8ohk2bq7az6@newsgroups.borland.com>
User-Agent: Opera7.10/Win32 M2 build 2840
NNTP-Posting-Host: 210.9.89.210
X-Trace: newsgroups.borland.com 1058856078 210.9.89.210 (21 Jul 2003 23:41:18 -0700)
Lines: 20
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!sjc72.webusenet.com!news.webusenet.com!wn14feed!worldnet.att.net!216.166.71.14!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail