Exemplo n.º 1
0
        public Memory(Process process)
        {
            if (process == null)
            {
                throw new InvalidOperationException("Process is invalid.");
            }

            this.processHandle = SystemWin32.OpenProcess(SystemWin32.PROCESS_ALL_ACCESS, false, process.Id);
        }
Exemplo n.º 2
0
 public bool Write(IntPtr address, byte[] buffer)
 {
     return(SystemWin32.WriteProcessMemory(processHandle, address, buffer, buffer.Length, ref lastOpProcessedBytes));
 }
Exemplo n.º 3
0
 public byte[] Read(IntPtr address, Int32 size)
 {
     byte[] buffer = new byte[size];
     SystemWin32.ReadProcessMemory(processHandle, address, buffer, buffer.Length, ref lastOpProcessedBytes);
     return(buffer);
 }