Tip - Wow64DisableWow64FsRedirection
Details - This function is useful for 32-bit applications that want to gain access to the native “%SystemRoot%\System32” directory in 64bit OS. By default, WOW64 file system redirection is enabled.
BOOL WINAPI Wow64DisableWow64FsRedirection
  __out  PVOID *OldValue
);
To restore file system redirection, the Wow64RevertWow64FsRedirect
BOOL WINAPI Wow64RevertWow64FsRedirection(
  __in  PVOID OldValue
);
The following example uses Wow64DisableWow64FsRedire
| void   main() {     HANDLE hFile =   INVALID_HANDLE_VALUE;     PVOID OldValue = NULL;     //  Disable redirection immediately prior   to the native API     //  function call.     if( Wow64DisableWow64FsRedirection     {           //  Any function calls in   this block of code should be as concise           //  and as simple as   possible to avoid unintended results.           hFile =   CreateFile(TEXT("C:\\Windows\\               GENERIC_READ,               FILE_SHARE_READ,               NULL,               OPEN_EXISTING,               FILE_ATTRIBUTE_NORMAL,               NULL);           //  Immediately re-enable   redirection. Note that any resources           //  associated with   OldValue are cleaned up by this call.         if   ( FALSE == Wow64RevertWow64FsRedirection(         {             //  Failure to re-enable redirection   should be considered               //  a criticial failure and   execution aborted.               return;         }     }     //  The handle, if valid, now can be used   as usual, and without     //  leaving redirection disabled.      if( INVALID_HANDLE_VALUE   != hFile )       {         //   Use the file handle     } } | 
Reference   - 
Posted By : Velayudhan Pillai K
