public bool Execute <T>(ProcessMemory mem, T param) where T : struct { bool ret = false; using (RemoteAllocation ralloc = RemoteAllocation.CreateNew <T>(mem, param)) { ret = Execute(ralloc.Address); } return(ret); }
public static RemoteAllocation CreateNew <T>(ProcessMemory memory, T data) where T : struct { RemoteAllocation ralloc = new RemoteAllocation(memory.Process); if (!ralloc.Allocate(TypeCache <T> .Size)) { return(null); } memory.Write(ralloc.Address, data); return(ralloc); }
public RemoteAllocation Allocate <T>(T data) where T : struct { return(RemoteAllocation.CreateNew <T>(this, data)); }