Let's say I am developing a program for Windows. What are some things I can / can't do if I want it to be usable for 32 / 64 bit platforms?
Asked
Active
Viewed 175 times
0
-
1This is to some degree programming language dependend, and it is probably too broad. Moreover, is this a hypothetical question, or do you have a specific program in mind you are going to write? – Doc Brown Jun 07 '16 at 04:31
2 Answers
3
My thoughts on this
- 32-bit applications can run on 64-bit windows but not vice-versa.
- 32-bit applications running on 64-bit windows by default see a "virtual" view of the filesystem and registry. This can get rather confusing sometimes.
- If your application uses a custom driver then that driver will need to have 32-bit and 64-bit versions of the driver. 64-bit windows is far more restrictive about driver-signing than 32-bit was.
- I am aware of at least one set of APIs* that is broken for 32-bit applications on 64-bit windows. If you run into such an API you may need to make seperate 32-bit and 64-bit builds of your application.
- In general test early and often on all supported platforms. It's easier to work arround a quirk you discover (whether related to version or number of bits) when you are first developing a feature than it is to have to deal with it later.
* The one i'm aware of is the "advanced firewall" COM API used to reconfigure the firewall on windows 7, but I expect if there is one such API broken there are others.

Peter Green
- 2,125
- 9
- 15
-
2Often 64-bit apps cannot use 32-bit libs (and vice versa). You can avoid 32/64-bit problems if you develop code for virtual machines (i.e. java or c#) – k3b Jun 07 '16 at 06:55
-
@k3b but then you just push the question to "what are the incompatibilities between this .Net machine and this JVM machine both running on this Intel machine" – Caleth Jun 07 '16 at 13:00
0
What are some things I can / can't do if I want it to be usable for 32 / 64 bit platforms?
Everything @Peter Green said is right. Most of time, programs will be able to run on both 32bits / 64bits. Here are some other pitfalls:
- using a library which runs only on either is the most common constraint
- doing some funky stuff with pointer arithmetic can easely backfire because of a wrong assumption in a pointer's size (for c++ folks)
- programs using more than 4Gb memory require 64bit
- doing some very low-level OS/drivers stuff

dagnelies
- 5,415
- 3
- 20
- 26