Thread View: borland.public.cppbuilder.nativeapi
9 messages
9 total messages
Started by Peter
Wed, 25 Oct 2006 16:30
64 bit systems / registry
Author: Peter
Date: Wed, 25 Oct 2006 16:30
Date: Wed, 25 Oct 2006 16:30
12 lines
1338 bytes
1338 bytes
Hi, In my 32bit code I set and use registry keys. So far so good, all this will be in the 32bit version of the registry. However I also set keys to influence the system, particulary file extension associations. E.g. to associate certain files with my program. I wonder if I should set those in the 64 bit variant of the registry on 64bit systems ? Or will Windows look at both versions of the registry for this ?
Re: 64 bit systems / registry
Author: Peter
Date: Thu, 26 Oct 2006 16:39
Date: Thu, 26 Oct 2006 16:39
21 lines
1717 bytes
1717 bytes
I take it this is not the right newsgroup ? Could anyone please make a suggestion on where to post better ? Thanks ------------------------------------------------------- "Peter" <Will_Bounce_So_Use_My_First_Name@Smart-Projects.net> wrote in message news:453f9138@newsgroups.borland.com... > Hi, > > In my 32bit code I set and use registry keys. > So far so good, all this will be in the 32bit version of the registry. > > However I also set keys to influence the system, particulary file > extension associations. > E.g. to associate certain files with my program. > > I wonder if I should set those in the 64 bit variant of the registry on > 64bit systems ? > Or will Windows look at both versions of the registry for this ? > >
Re: 64 bit systems / registry
Author: Remy Lebeau (TeamB)
Date: Thu, 26 Oct 2006 18:51
Date: Thu, 26 Oct 2006 18:51
21 lines
1577 bytes
1577 bytes
"Peter" <Will_Bounce_So_Use_My_First_Name@Smart-Projects.net> wrote in
message news:4540e4da@newsgroups.borland.com...
> I take it this is not the right newsgroup ?
It is. If noone had answered yet, then noone had the answer yet.
Please read MSDN for specific details about how the 64-bit Registry actually
works:
Registry Redirector
http://msdn.microsoft.com/library/en-us/winprog64/winprog64/registry_redirector.asp
To answer your specific question - no, you do not have to manually copy your
file extension keys to the 32-bit and 64-bit portions of the Registry.
Registry Reflection handles that automatically for you.
Gambit
Re: 64 bit systems / registry
Author: Bob Gonder
Date: Thu, 26 Oct 2006 19:16
Date: Thu, 26 Oct 2006 19:16
12 lines
1528 bytes
1528 bytes
Peter wrote: >Could anyone please make a suggestion on where to post better ? b.p.cppbuilder.non-technical Or maybe some MS group? Or Google for "64 bit registry" gave this hit that looks good. http://www.devx.com/amd/Article/20367 >> I wonder if I should set those in the 64 bit variant of the registry on >> 64bit systems ? >> Or will Windows look at both versions of the registry for this ?
Re: 64 bit systems / registry
Author: Peter
Date: Thu, 26 Oct 2006 19:35
Date: Thu, 26 Oct 2006 19:35
16 lines
1910 bytes
1910 bytes
> Registry Redirector > > http://msdn.microsoft.com/library/en-us/winprog64/winprog64/registry_redirector.asp > > To answer your specific question - no, you do not have to manually copy > your > file extension keys to the 32-bit and 64-bit portions of the Registry. > Registry Reflection handles that automatically for you. Thanks ! Just what I needed. Still a bit confusing as the keys listed on top that are supposed to be in the 'redirection' and 'reflection' lists are not keys used for file-extensions, but then they do explictely talk about file extension registration and it also says "Most of the keys under the classes root are in this category.", which is the key where the extension keys 'live'.
Re: 64 bit systems / registry
Author: Remy Lebeau (TeamB)
Date: Thu, 26 Oct 2006 19:43
Date: Thu, 26 Oct 2006 19:43
15 lines
1510 bytes
1510 bytes
"Peter" <Will_Bounce_So_Use_My_First_Name@Smart-Projects.net> wrote in
message news:45410e00$1@newsgroups.borland.com...
> Still a bit confusing as the keys listed on top that are supposed to
> be in the 'redirection' and 'reflection' lists are not keys used for
> file-extensions
Yes, they are. HKEY_CLASSES_ROOT maps to the the HKEY_USERS\{current user
SID}\Software\Classes and HKEY_LOCAL_MACHINE\Software\Classes key, which are
both reflected keys. The "Registry Reflection" topic even shows an example
of a file extension registration being reflected.
Gambit
Re: 64 bit systems / registry
Author: Peter
Date: Thu, 26 Oct 2006 19:54
Date: Thu, 26 Oct 2006 19:54
16 lines
1827 bytes
1827 bytes
> HKEY_CLASSES_ROOT maps to the the HKEY_USERS\{current user
SID}\Software\Classes and HKEY_LOCAL_MACHINE\Software\Classes
I didn't know that ?
Thanks for pointing that out. Now it becomes a lot more clearer.
So, then I wonder:
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 ? Or is this one unique
for boths views ?
So can I conclude that for my own application registry handling I am working
solely in the 32 bit view ?
And should I build a 64bit version, I would not have the benefit of
mirroring for those keys then ?
Re: 64 bit systems / registry
Author: Peter
Date: Thu, 26 Oct 2006 19:54
Date: Thu, 26 Oct 2006 19:54
3 lines
1090 bytes
1090 bytes
> http://www.devx.com/amd/Article/20367 Thank you for the link!
Re: 64 bit systems / registry
Author: 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads