🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Refresh Windows Registry

#6803
From: Jim Dodd
Date: Mon, 11 Apr 2005 18:45
27 lines
2083 bytes
Danila Vershinin wrote:
> That's weird. everything should be refreshed already (without that closing 
> and reopening of key). Saying that because the changes when you use the 
> WriteInteger..WriteString and so on methods are actually done when you put 
> them in the code, not when you close the key you are working with.
> What I think is that Grety should rephrase the question. Maybe you mean 
> Refresh an associated TTreeView object (not in Regedit) ? That I would 
> understand...
> 
> Cheers, Danila 
> 
> 

 From the MS Help for RegCloseKey:

"The RegCloseKey function does not necessarily write information to the
registry before returning; it can take as much as several seconds for
the cache to be flushed to the hard disk. If an application must 
explicitly write registry information to the hard disk, it can use the
RegFlushKey function. RegFlushKey, however, uses many system resources
and should be called only when necessary. "

So, it seems to me that closing the Registry key is the minimum needed
to update the Registry.

Jim Dodd
Onset Computer Corp.
Technical Details
Message-ID: <425ac5b1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <42594bd9@newsgroups.borland.com> <42595da1@newsgroups.borland.com> <425a2d11@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,e6e3b9d83755cc0d
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Mon, 11 Apr 2005 14:45:06 -0400
From: Jim Dodd <bcbuilderboy@yahoo.com>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Refresh Windows Registry
References: <42594bd9@newsgroups.borland.com> <42595da1@newsgroups.borland.com> <425a2d11@newsgroups.borland.com>
In-Reply-To: <425a2d11@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 24.75.243.228
Message-ID: <425ac5b1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1113245105 24.75.243.228 (11 Apr 2005 11:45:05 -0800)
Lines: 27
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail