Exemplo n.º 1
0
 public void Write(IntPtr addr, byte[] data)
 {
     if (!Native.WriteProcessMemory(_handle, addr, data, data.Length))
     {
         throw new InjectorException("Failed to write process memory", new Win32Exception(Marshal.GetLastWin32Error()));
     }
 }
Exemplo n.º 2
0
 public void Write(IntPtr addr, byte[] data)
 {
     if (IsDriver)
     {
         KernelMemorySharp.MemoryDriver.WriteBytes(addr, data);
     }
     else if (!Native.WriteProcessMemory(_handle, addr, data, data.Length))
     {
         throw new InjectorException("Failed to write process memory", new Win32Exception(Marshal.GetLastWin32Error()));
     }
 }