How to detect programmatically whether you are running on 64-bit Windows

To detect programmatically whether your 32-bit program is running on 64-bit Windows, you can use the IsWow64Process function. Do not do as some people do and hard-code the list of 64-bit processors. You'd think that after the hard-coded list of 64-bit processors changed the first time (when x64 was added to ia64), people would have learned thei...