In our vc++ win32 application we are reading a registry value of type reg_multi_sz, its working fine on 32-bit but giving empty buffer when i ran on 64- bit. How can I read values of 64 bit registry from my 32-bit application ?
views:
514answers:
2
A:
Try the sample code listed on the following help article. It's written specifically for reading REG_MULTI_SZ
values.
JaredPar
2010-01-18 18:07:23
thanks for giving the example
2010-01-19 04:34:45
+1
A:
Could you be more specific? Usually when your try to read 64-bit registry hive in 32-bit code you must open HKLM\Software using KEY_WOW64_64KEY. Hope that helps.
iaimtomisbehave
2010-01-18 18:12:36
Thank you so much using this KEY_WOW64_64KEY access right its working fine onn 32 and 64 bit registry.
2010-01-19 04:33:25
On 64 bit version of Windows parts of the registry are stored seperately for 32-bit apps and 64 bit apps. KEY_WOW64_64KEY will enable explicit access to the 64-bit view. Unless I look at more of your code I won't be able tell exactly why it failed in the first place. But this hopefully gives you enough information to figure that out.
iaimtomisbehave
2010-01-19 18:19:25