Exemple #1
0
        /// <summary>
        /// Read an int (Int32) out of memory (with -/+)
        /// </summary>
        /// <param name="address">The target address</param>
        /// <returns>The data you want (4 bytes)</returns>
        public Int32 ReadInt32 <T>(T address)
        {
            var adr = CastToIntPtr(address);

            var data = BitConverter.ToInt32(Interop.ReadProcessMemoryHelper(Handle, adr, 4), 0);

            return(data);
        }
Exemple #2
0
        /// <summary>
        /// Read an unsigned long (UInt64) out of memory (with -/+)
        /// </summary>
        /// <param name="address">The target address</param>
        /// <returns>The data you want (8 bytes)</returns>
        public UInt64 ReadUInt64 <T>(T address)
        {
            var adr = CastToIntPtr(address);

            var data = BitConverter.ToUInt64(Interop.ReadProcessMemoryHelper(Handle, adr, 8), 0);

            return(data);
        }
Exemple #3
0
        /// <summary>
        /// Read an Byte out of memory (byte without -/+)
        /// </summary>
        /// <param name="address">The target address</param>
        /// <returns>The data you want (1 byte)</returns>
        public Byte ReadByte <T>(T address)
        {
            var adr = CastToIntPtr(address);

            var data = Interop.ReadProcessMemoryHelper(Handle, adr, 1)[0];

            return(data);
        }
Exemple #4
0
        /// <summary>
        /// Reads a chunk out of memory which has to be manipulated afterwards.
        /// </summary>
        /// <param name="address">The target address</param>
        /// <param name="size">The size (length) of data you want to read</param>
        /// <returns>The chunk you want out of memory</returns>
        public Byte[] ReadMemory <T>(T address, int size)
        {
            var adr = CastToIntPtr(address);

            var data = new byte[size];

            data = Interop.ReadProcessMemoryHelper(Handle, adr, size);

            return(data);
        }