I found the best way to get rid of errors is to check your code for any code that performs any of the following actions and fix it in a 32-bit world, and then start the port.
- Uses untyped containers and castings, not the right container.
- Uses throws for storing pointers in DWORD for any reason, usually as the final prelude for storing in a container
- archiving casting
In cases where you really need to perform a DWORD / ptr operation, change the type to DWORD_PTR.
I saw a lot of code using CStringToPtr, not CMap <> with the corresponding types.
All these things are likely to be compiled to 64 bits (without warning due to the actor) and then fall on their face. If they used the correct types and without casting, the code would work for the first time.
Also check for any subclass code that WndProc sets - to set this parameter on 64-bit Windows, you need a different flag.
If you use MFC, you will also (uselessly) find that container sizes now return 64 bits instead of 32 bits, which means that your 32-bit / 64-bit archiving will be violated. You will have to do this when you go. We created our own implementation of MFC with some clever tricks to allow us to de-serialize 32-bit archives on 64-bit blocks and vice versa.
source share