Beispiel #1
0
            public static bool SetPageProtection(IntPtr baseAddress, int size, Enums.MemoryProtection newProtection, out Enums.MemoryProtection oldProtection)
            {
                bool res = PInvoke.VirtualProtect(baseAddress, size, newProtection, out var oldProtect);

                oldProtection = oldProtect;
                return(res);
            }
Beispiel #2
0
 public static extern bool VirtualProtect(IntPtr lpAddress, int dwSize,
                                          Enums.MemoryProtection flNewProtect, out Enums.MemoryProtection lpflOldProtect);
Beispiel #3
0
 public static extern IntPtr VirtualAlloc(IntPtr lpAddress, UIntPtr dwSize, Enums.AllocationType lAllocationType, Enums.MemoryProtection flProtect);
Beispiel #4
0
 public static IntPtr Allocate(uint size, Enums.AllocationType flAllocType = Enums.AllocationType.Commit | Enums.AllocationType.Reserve, Enums.MemoryProtection flMemProtectType = Enums.MemoryProtection.ExecuteReadWrite)
 => PInvoke.VirtualAlloc(IntPtr.Zero, new UIntPtr(size), flAllocType, flMemProtectType);
Beispiel #5
0
 internal static extern IntPtr VirtualAllocEx(IntPtr hProcess, IntPtr lpAddress,
                                              IntPtr dwSize, Enums.AllocationType flAllocationType, Enums.MemoryProtection flProtect);