Article View: borland.public.cppbuilder.nativeapi
Article #2892Re: 64 bit systems / registry
From: Remy Lebeau (TeamB)
Date: Thu, 26 Oct 2006 20:57
Date: Thu, 26 Oct 2006 20:57
42 lines
3074 bytes
3074 bytes
"Peter" <Will_Bounce_So_Use_My_First_Name@Smart-Projects.net> wrote in
message news:45411265$1@newsgroups.borland.com...
> All my in-app registry handling (settings etc.)(also in combination with
the
> installer (Inno)) happens in:
> HKEY_CURRENT_USER\Software
> Does this key map into one of the reflected keys ?
HKEY_CURRENT_USER maps to HKEY_USERS\{current user SID}. Whether that is
actually refected or not, I'm not sure. The documentation is a little
ambiquious about that. It suggests that it is not, but I have seen people
say that it is. You will just have to use RegQueryReflectionKey() to find
out if a given key is reflected or not in your code, so that you can then
adjust your reading/writing accordingly as needed. Microsoft recommends
that anyway. Unfortunately, I have also seen Microsoft state in online
messages that "[RegQueryReflectionKey] simply says if someone set disable
reflection on the key. Reflection is enabled doesn't mean it will be
reflected." So it seems that only certain pre-defined keys may actually
take part in reflection.
> So can I conclude that for my own application registry handling I
> am working solely in the 32 bit view ?
Only if your application is compiled for 32-bit. 64-bit applications will
access the 64-bit section of the Registry instead.
> And should I build a 64bit version, I would not have the benefit
> of mirroring for those keys then ?
The 32-bit and 64-bit versions of your application would maintain separate
copies of the key data. To force a 32-bit or 64-bit application access the
64-bit portion of the Registry specifically, you have to specify the
KEY_WOW64_64KEY flag when opening/creating/deleting a key. Likewise, to
force the 32-bit portion, use the KEY_WOW64_32KEY flag.
I don't know if you can create reflection for your own keys or not. The
documentation for the RegEnableReflectionKey() and RegDisableReflectionKey()
suggests that they only work for keys that are pre-defined for reflection.
Gambit
Technical Details
Message-ID:
<4541219e$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!ecngs!feeder.ecngs.de!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<453f9138@newsgroups.borland.com> <4540e4da@newsgroups.borland.com> <454103ff$1@newsgroups.borland.com> <45410e00$1@newsgroups.borland.com> <4541100a@newsgroups.borland.com> <45411265$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,c9a2c5d8e8dd55fb 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: <453f9138@newsgroups.borland.com> <4540e4da@newsgroups.borland.com> <454103ff$1@newsgroups.borland.com> <45410e00$1@newsgroups.borland.com> <4541100a@newsgroups.borland.com> <45411265$1@newsgroups.borland.com> Subject: Re: 64 bit systems / registry Date: Thu, 26 Oct 2006 13:57:59 -0700 Lines: 44 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: 69.169.4.232 Message-ID: <4541219e$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1161896350 69.169.4.232 (26 Oct 2006 13:59:10 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!ecngs!feeder.ecngs.de!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail