示例#1
0
        public byte[] ReadBytes(IntPtr address, int size)
        {
            byte[] bytes = new byte[size];

            if (!Native.ReadProcessMemory(_handle, address, bytes, size))
            {
                throw new InjectorException("Failed to read process memory", new Win32Exception(Marshal.GetLastWin32Error()));
            }

            return(bytes);
        }
示例#2
0
        public byte[] ReadBytes(IntPtr address, int size)
        {
            byte[] bytes = new byte[size];

            if (!Native.ReadProcessMemory(_handle, address, bytes, size))
            {
                //throw new InjectorException("Failed to read process memory", new Win32Exception(Marshal.GetLastWin32Error()));
                Console.WriteLine("Error read process memory on 0x" + address.ToString("X"));
            }

            return(bytes);
        }