BBC BASIC for Windows
Programming >> Operating System >> Accessing the registry: 32 and 64 bit?
http://bb4w.conforums.com/index.cgi?board=os&action=display&num=1387100760

Accessing the registry: 32 and 64 bit?
Post by g3nrw on Dec 15th, 2013, 08:46am

Richard

There are several references and code snippets in the BB4W documentation that describe how to read/write the Windows Registry.

I am working on a new program that needs to do this. Will the "RegCreateKeyEx" and "RegOpenKeyEx" methods work with both 32 and 64-bit Windows?

--
Ian

Re: Accessing the registry: 32 and 64 bit?
Post by admin on Dec 15th, 2013, 09:49am

on Dec 15th, 2013, 08:46am, g3nrw wrote:
Will the "RegCreateKeyEx" and "RegOpenKeyEx" methods work with both 32 and 64-bit Windows?

Yes - how else could 32-bit applications (vast numbers of which access the registry) run in 64-bit Windows otherwise? Obviously your program will only 'see' the 32-bit registry, so if you're trying to find your registry entries using (for example) the 64-bit version of REGEDIT you will need to look in the relevant WoW6432Node section.

Richard.
Re: Accessing the registry: 32 and 64 bit?
Post by g3nrw on Dec 15th, 2013, 10:43am

on Dec 15th, 2013, 09:49am, Richard Russell wrote:
if you're trying to find your registry entries using (for example) the 64-bit version of REGEDIT you will need to look in the relevant WoW6432Node section.


WoW6432Node: that's the key word I was looking for. My program needs to access the registry entries of someone else's 64-bit program. More homework needed.

Thanks Richard

--
Ian

Re: Accessing the registry: 32 and 64 bit?
Post by admin on Dec 15th, 2013, 12:47pm

on Dec 15th, 2013, 10:43am, g3nrw wrote:
My program needs to access the registry entries of someone else's 64-bit program.

In that case you will need this information:

http://msdn.microsoft.com/en-us/library/windows/desktop/aa384129.aspx

You should not reference 'WoW6432Node' from code.

Richard.

Re: Accessing the registry: 32 and 64 bit?
Post by g3nrw on Dec 15th, 2013, 2:19pm

on Dec 15th, 2013, 12:47pm, Richard Russell wrote:
In that case you will need this information:

http://msdn.microsoft.com/en-us/library/windows/desktop/aa384129.aspx



That's more like it. Thanks again Richard.

--
73
Ian