#include <windows.h>
#if defined(_X86_)
#define TEST_STRING L"Hello! 32bit World"
#define CROSS_ACCESS KEY_WOW64_64KEY
#elif defined(_WIN64)
#define TEST_STRING L"Hello! 64bit World"
#define CROSS_ACCESS KEY_WOW64_32KEY
#endif
VOID
PrintRegistryValueKey(
HKEY hKeyParent,
PWCHAR KeyName,
DWORD dwAccessMask,
DWORD dwHiveFlag
)
{
DWORD dwState=0;
HKEY hKey;
WCHAR Buffer[MAX_PATH];
DWORD dwSize = sizeof (Buffer);
DWORD dwType;
DWORD dwRet;
....
#if defined(_X86_)
#define TEST_STRING L"Hello! 32bit World"
#define CROSS_ACCESS KEY_WOW64_64KEY
#elif defined(_WIN64)
#define TEST_STRING L"Hello! 64bit World"
#define CROSS_ACCESS KEY_WOW64_32KEY
#endif
VOID
PrintRegistryValueKey(
HKEY hKeyParent,
PWCHAR KeyName,
DWORD dwAccessMask,
DWORD dwHiveFlag
)
{
DWORD dwState=0;
HKEY hKey;
WCHAR Buffer[MAX_PATH];
DWORD dwSize = sizeof (Buffer);
DWORD dwType;
DWORD dwRet;
....