Beispiel #1
0
        /// <summary>
        /// Reads a value from memory.
        /// </summary>
        /// <param name="dwAddress">Address at which value will be read.</param>
        /// <param name="objType">Type of object to be read (hint: use Object.GetType() or typeof(ObjectType) macro).</param>
        /// <exception cref="Exception">Throws general exception on failure.</exception>
        /// <returns>Returns the value that was read from memory.</returns>
        public object ReadObject(uint dwAddress, Type objType)
        {
            if (!this.m_bProcessOpen || this.m_hProcess == IntPtr.Zero)
            {
                throw new Exception("Process is not open for read/write.");
            }

            return(SMemory.ReadObject(this.m_hProcess, dwAddress, objType));
        }