Does the results of IntPtr.Size show the OS that the .NET app is running on or which version of .NET Framework that is running? If you have a 32-bit app running on a 64-bit machine using WOW, what will IntPtr.Size show (4 or 8)?
+4
A:
It returns the bitness of the current process.
Therefore, if your assembly is compiled as x86 only, it will always return 4, even on an x64 OS.
SLaks
2010-04-08 14:06:41
So you are saying that it will return 4 since the process is 32-bit, even though it is running on a 64-bit machine?
2010-04-08 14:07:37
@user54064 Yes that is what SLaks is saying
ParmesanCodice
2010-04-08 14:10:22
Yes. If the process is 32-bit, it will return 4.
SLaks
2010-04-08 14:14:15