public static extern IntPtr VirtualAllocEx(IntPtr processHandle, IntPtr startAddress, IntPtr size, APIProxy.AllocationType allocationType, APIProxy.MemoryProtection protection);
public MemoryRegion AllocateMemory(int size, APIProxy.AllocationType allocationType = APIProxy.AllocationType.Reserve | APIProxy.AllocationType.Commit, APIProxy.MemoryProtection memoryProtection = APIProxy.MemoryProtection.PAGE_EXECUTE_READ_WRITE) { MemoryRegion allocation = APIProxy.VirtualAllocEx(handle, Address.Zero(), size, allocationType, memoryProtection); return(allocation); }