/// <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.mProcessOpen || this.mProcess == IntPtr.Zero) { throw new Exception("Process is not open for read/write."); } return(MemoryHelper.ReadObject(this.mProcess, dwAddress, objType)); }