/// <summary> /// Return the String /// </summary> public static String GetString(IntPtr handleProcess, IntPtr address, int bufferLength) { byte[] buffer = new byte[bufferLength]; MemoryAccessAPI.ReadProcessMemory(handleProcess, address, buffer, bufferLength, out var read); return(Encoding.Unicode.GetString(buffer, 0, buffer.Length)); }
/// <summary> /// Return the Bytes /// </summary> public static byte[] GetBytes(IntPtr handleProcess, IntPtr address, int bufferLength) { byte[] buffer = new byte[bufferLength]; MemoryAccessAPI.ReadProcessMemory(handleProcess, address, buffer, bufferLength, out var read); return(buffer); }
/// <summary> /// Return the Integer /// </summary> public static int GetInteger(IntPtr handleProcess, IntPtr address, int bufferLength) { byte[] buffer = new byte[bufferLength]; MemoryAccessAPI.ReadProcessMemory(handleProcess, address, buffer, bufferLength, out var read); return(BitConverter.ToInt32(buffer, 0)); }