I am trying to implement recursive deletion of Registry Keys for both 32-bit and 64-bit OS. As RegDeleteKeyEx is not defined for OSes lesser than XP x64 Pro
RegDeleteKeyEx isn't actually a function - it's a macro. Depending on whether you have UNICODE defined, the macro expands to the actual function name which is given at the bottom of the MSDN page:
RegDeleteKeyExW (Unicode) and RegDeleteKeyExA (ANSI)
So in your case, you probably want something like
#ifdef UNICODE
const char RegDeleteKeyExSymbol[] = "RegDeleteKeyExW";
#else
const char RegDeleteKeyExSymbol[] = "RegDeleteKeyExA";
#endif
_RegDeleteKeyEx = (PFN_RegDeleteKeyEx)GetProcAddress( hAdvAPI32, RegDeleteKeyExSymbol );
This will use the appropriate symbol name depending on how your own code is compiled (with or without UNICODE defined).