views:

368

answers:

4

I have windows application build using Visual C++. Its being build and run on 32 bit windows env. Now I need to make sure it works on windows vista / 7 64 bit env. What all things I need to consider for this porting process ??

+1  A: 

Porting guide: http://msdn.microsoft.com/en-us/library/aa384190(VS.85).aspx

Zitrax
+7  A: 

That's not porting from 32bit to 64, that's just running your 32bit code on a 64bit machine to make sure it still works.

The way to do that is to just test all the functionality on the 64-bit machine, just as you do every time you release a new version, right? :-)

If you really want to port it (i.e., compile it to a 64bit executable), the first step is to just try it. You may find it works as-is. I'd only be worried about porting problems if you try it and then problems appear.

Then, and only then, would I go looking for the causes. Otherwise it's potentially wasted effort.

paxdiablo
Too true. The only significant porting issue I've had is assuming pointers are 4 bytes and loading a memory mapped file. Everything else "just works".
Goz
A: 

One think to watch out for is if you're storing plain old data (POD) into files or passing POD data to other apps via IPC or sockets etc. We also had code which assumed 4 byte longs and also assumed 4 byte pointers. Needless to say we removed these anachronisms.

Compilers are usually good at spotting the other kinds of errors, i.e. long to int conversions etc. So it's usually just a case of heeding your compilers warnings and altering your code accordingly.

ScaryAardvark
+2  A: 

Article Seven Steps of Migrating a Program to a 64-bit System

Abstract. The article describes the main steps which should be performed to correctly port 32-bit Windows applications on 64-bit Windows systems. Although the article is meant for developers using C/C++ in Visual Studio 2005/2008 environment, it will be also useful for other developers who plan to port their applications on 64-bit systems.

Andrey Karpov