How to detect 64-bit OS

On 64-bit Windows the 32-bit Windows-based applications run under WOW64 x86 emulator. WOW64 isolates 32-bit applications from 64-bit applications, which includes preventing file and registry collisions. Console, GUI, and service applications are supported. However, 32-bit processes cannot load 64-bit DLLs, and 64-bit processes cannot load 32-bit DLLs.