Is there any function that I can call to in a 32-bit app that would convert the paths that it thinks it's using to and from the paths that it's actually using? (For instance, call it to convert the path for a folder in Program Files to a path in Program Files (x86) or vice versa when running on a 64-bit system.) I need to do this so that, when the user is presented with a directory in the GUI (as when browsing for files or directories), he sees the real directory, rather than what the app itself thinks it sees.
We need to support both 32- and 64-bit Windows, so this should work in both environments.
Edit The need to deal with WOW64 lies in the fact that my app is the bootstrap application of an installer. By default, the product is installed under Program Files on a 32-bit system, while on a 64-bit system, it's installed under Program Files (x86). The dialogue that lets the user choose where to install the product (including on a different hard drive altogether if that's what he wants or needs); and it must work properly in both environments. Currently, it's always displaying (and browsing in) Program Files, even on 64-bit systems.