2012-04-19

WOW64

Some time ago, I happened to know WOW64 is short for "Win 32 On Win 64" - WOW!

This time for a bug, I looked deeper.
  • Changes to file system are more visible
File System Redirector
only system32 and most sub-folders are taken care of;
"Program Files" is not covered here, but by using environment variables;
for 32-bit and 64-bit programs, they use their own copies - redirected to different folders; the shared are bit regardless, like logfiles, hosts are plain text files;
  • Changes to Registry are more error prone
Registry Reflection - it was used, now deprecated; using the share model;
Registry Redirector - copy model, in most recently versions of OSs
Registry Keys Affected by WOW64 - finally, copy model and share model co-exist

And even worse, Wow6432Node could generate recursive path; regedit handles this correctly;

But, most of us developers are not going to learn all this, or read the Best Practices for WOW64. We'd rather write our own functions, like check the OS's version, and make up the file/registry path by hand, instead of OS APIs, like IsWow64Process(), or environment variables.

No comments:

Post a Comment