void before_each() { buffer = Marshal.AllocHGlobal(4); replaceWith = new byte[] { 0x37, 0x13, 0, 0 }; Marshal.WriteInt32(buffer, 0); memory = new InProcessMemory(); patch = new Patch(memory, buffer, replaceWith); }
public PatchingHook(IMemory memory, IntPtr targetAddress, byte[] redirection) { Patch = new Patch(memory, targetAddress, redirection); }