This is a followup question of: RegDeleteKey and RegDeleteKeyEx
Background
So, I have a C++ windows application that uses RegDeleteKey function. However, I need to control the platform-specific view of the registry.
So, based on this:
64-bit Windows: On WOW64, 32-bit applications view a registry tree that is separate from the registry tree that 64-bit applications view. To enable an application to delete an entry in the alternate registry view, use the RegDeleteKeyEx function
Using RegDeleteKeyEx function is great when your app runs on Vista and above, but what about XP?
Question
How to delete registry key on XP while having control over platform-specific view of the registry
RegDeleteKeyEx
exists on every platform that has a 64 bit version with WOW64. You use it on those platforms. Otherwise you can useRegDeleteKey
. And it doesn't matter that it isn't aware of registry views since you won't be calling it on a platform that has different registry views.64 bit Windows was introduced after XP. There was a 64 bit version of XP and a corresponding 64 bit version of server 2003. These were the first versions that offered 64 bits with WOW64 and both support
RegDeleteKeyEx
.