VcCom

Home of the VcCom API

32bit (x86) to 64bit (x64)

Getting VC++/C++ Windows Applications Working On 64bit Machines

Almost all new PCs are 64bit (x64) and luckily most 32bit (x86) applications will run on 64bit machines. This is because Microsoft have kindly provided a 32bit emulator for the 64bit version of Windows. Using the 32bit emulator will mean than the application will run a bit slower than a 64bit version of the same application, but the difference is minor in most cases.

Problems arise with applications on 64bit machines for a few different reasons:

  • The installer and/or application uses hardcoded paths, this can also be a problem when you try and use an application on a newer operating system (such as Windows 7 or Windows 8) where specific folders cannot be written to by default.

  • If your application uses a system dll or is even loaded by the system you may have a problem. You cannot mix 32bit exes/dlls and 64bit dlls, so if you have a 32bit application which attempts to load a 64bit dll - it will fail (but some COM c0mponents will work).

  • 32bit device drivers will not work on 64bit machines, you have to use 64bit drivers and these drivers have to be signed on the new operating systems. The installers also need elevated privileges to install the device drivers on the newer operating systems.

Problems with generating 64bit versions of an application

  • It is fairly simple to add a 64bit build to a VC++, C++ application, however you may run into a number of issues, some of these issues are pointed out to you via the compiler as warnings, some are not. Most of the issues have to do with type size that has changed between 32bit and 64bit.

I have experience of migrating Windows VC++/C++applications (including device drivers) from 32bit to 64bit, correcting the code where required, testing, creating installers and generating both 32bit and 64bit versions of applications. I can offer this as a service to companies that have the source code to the applications. Please contact me for more details.