Esempio n. 1
0
 public uint ChangeProtection(APIProxy.MemoryProtection newProtection, int sizeOfVariable)
 {
     return(APIProxy.VirtualProtectEx(callback.GetHandle(), GetAddress(), sizeOfVariable, (uint)newProtection));
 }
Esempio n. 2
0
 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);
        }