public static T ReadMemory <T>(int Adress) where T : struct { byte[] numArray = new byte[Marshal.SizeOf(typeof(T))]; Mem.ReadProcessMemory((int)Mem.m_pProcessHandle, Adress, numArray, numArray.Length, ref Mem.m_iNumberOfBytesRead); return(Mem.ByteArrayToStructure <T>(numArray)); }
public static float[] ReadMatrix <T>(int Adress, int MatrixSize) where T : struct { byte[] numArray = new byte[Marshal.SizeOf(typeof(T)) * MatrixSize]; Mem.ReadProcessMemory((int)Mem.m_pProcessHandle, Adress, numArray, numArray.Length, ref Mem.m_iNumberOfBytesRead); return(Mem.ConvertToFloatArray(numArray)); }
public static string ReadString(int address, int _Size) { byte[] numArray = new byte[_Size]; Mem.ReadProcessMemory((int)Mem.m_pProcessHandle, address, numArray, _Size, ref Mem.m_iNumberOfBytesRead); return(Encoding.ASCII.GetString(numArray)); }