I'm having a problem. So I'm working on an app that will be able to change a float in memory but the address I'm having is too long for IntPtr.
This is the code I have:
VAMemory vam = new VAMemory("APP NAME");
IntPtr ad = 0x264A373E7C0;
vam.WriteByte(ad, (Byte)100);
So in this ^ WriteByte it says the IntPtr address is too long. I have used this code before and it has worked but somehow it's not working with this address.
If IntPtr.Size == 4
then your program is targeting 32bit.
Even if you have selected AnyCPU
architecture, since VS2013, there is a project build property called Prefer 32-bit
and it must be turn off on 64bit machines to get IntPtr.Size == 8
.
When using the Perfer 32-Bit
flavor of AnyCPU
, the semantics are as follows: