public void loadPointer(long address) { IntPtr ptr; byte[] buffer = new byte[8]; bool retVal = ProcessMemoryReaderApi.ReadProcessMemory(this.mhProcess, (IntPtr)address, buffer, 8, out ptr); this.mPointerAddress = BitConverter.ToInt64(buffer, 0); }
public byte[] readMemoryBuffer(long Address, long offset) { IntPtr ptr; byte[] buffer = new byte[10]; if (ProcessMemoryReaderApi.ReadProcessMemory(this.mhProcess, (IntPtr)(Address + offset), buffer, 8, out ptr) == false) { return(new byte[0]); } return(buffer); }
public string readMemoryString(long address, int len) { IntPtr ptr; byte[] buffer = new byte[len]; string returnString = ""; ProcessMemoryReaderApi.ReadProcessMemory(this.mhProcess, (IntPtr)address, buffer, (uint)len, out ptr); for (int i = 0; i < buffer.Length; i++) { if (buffer[i] == '\0') { break; } returnString += (char)buffer[i]; } return(returnString); }