Tag: 内存 地址

MemorySharp设置偏移到不起作用的地址

好的,我正在使用MemorySharp库来读取/写入游戏的内存。 我的问题是当我尝试将偏移量添加到基指针地址时Visual Studio在运行时抛出错误。 这是基本代码 using (var m = new MemorySharp(ApplicationFinder.FromProcessName(“Cube”).First())) { IntPtr healthPtr = GetBaseAddress(“Cube”) + 0x0036B1C8; int[] offsets = {0x39c, 0x16c}; foreach(var offset in offsets) { healthPtr = m[healthPtr + offset].Read(); //I’m getting the error on this line } var healthLocation = m[m[healthPtr].Read()]; float health = healthLocation.Read(); MessageBox.Show(health.ToString()); } 这是我的GetBaseAddress方法 internal static IntPtr GetBaseAddress(string […]