Article View: borland.public.cppbuilder.nativeapi
Article #7756Re: Renaming a Registry Key and Value
From: Remy Lebeau (TeamB)
Date: Sun, 26 Dec 2004 22:13
Date: Sun, 26 Dec 2004 22:13
19 lines
1727 bytes
1727 bytes
"Maurice Anderson" <mauriceanderson@hotmail.com> wrote in message news:41cdc9c3$1@newsgroups.borland.com... > Hello, I noticed that MSDN does not have a function to rename > a registry key or registry value. Does anyone know a simply way > to do both? The Win32 API does not support what you are asking. To rename a key, you have to create a new key, copy the existing values to it, then delete the original key. To rename a value, you have to create a new value, copy the existing data to it, then delete the original value. In the VCL, the TRegistry class has MoveKey() and RenameValue() methods that do such work for you. If you are using the Win32 API directly, then you have to do everything manually yourself. Gambit
Technical Details
Message-ID:
<41cf374f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!news.wiretrip.org!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<41cdc9c3$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,38a4019495c05ce4 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <41cdc9c3$1@newsgroups.borland.com> Subject: Re: Renaming a Registry Key and Value Date: Sun, 26 Dec 2004 14:13:49 -0800 Lines: 21 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <41cf374f$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1104099151 68.69.17.41 (26 Dec 2004 14:12:31 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!news.wiretrip.org!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail