public IntPtr Allocate(IntPtr address, ulong size, PageProtectionFlags protectionFlags)
 {
     return IntPtr.Zero;
 }
 public PageProtectionFlags Protect(IntPtr address, ulong size, PageProtectionFlags protectionFlags)
 {
     return PageProtectionFlags.NoAccess;
 }
        IntPtr IMemoryPageManager.Allocate(IntPtr address, ulong size, PageProtectionFlags accessMode)
        {
            IntPtr memory = VirtualAlloc(address, (uint)size, VirtualAllocTypes.MEM_COMMIT | VirtualAllocTypes.MEM_RESERVE, AccessProtectionFlags.PAGE_EXECUTE_READWRITE);

            return memory;
        }
 PageProtectionFlags IMemoryPageManager.Protect(IntPtr address, ulong size, PageProtectionFlags accessMode)
 {
     throw new NotImplementedException();
 }
示例#5
0
 /// <summary>
 /// Changes the protection bits of the pages associated with the given range of memory.
 /// </summary>
 /// <param name="address">The starting address.</param>
 /// <param name="pages">The number of pages.</param>
 /// <param name="protectionFlags">The new set of protection flags.</param>
 /// <returns>The old protection flags of the first page in the range of memory. </returns>
 public PageProtectionFlags Protect(ulong address, ulong pages, PageProtectionFlags protectionFlags)
 {
     return PageProtectionFlags.NoAccess;	// TODO
 }
示例#6
0
 public PageProtectionFlags Protect(IntPtr address, ulong size, PageProtectionFlags protectionFlags)
 {
     return(PageProtectionFlags.NoAccess);
 }
示例#7
0
 public IntPtr Allocate(IntPtr address, ulong size, PageProtectionFlags protectionFlags)
 {
     return(IntPtr.Zero);
 }
示例#8
0
 PageProtectionFlags IMemoryPageManager.Protect(IntPtr address, ulong size, PageProtectionFlags accessMode)
 {
     throw new NotImplementedException();
 }
示例#9
0
 IntPtr IMemoryPageManager.Allocate(IntPtr address, ulong size, PageProtectionFlags accessMode)
 {
     return(VirtualAlloc(address, (uint)size, VirtualAllocTypes.MEM_COMMIT | VirtualAllocTypes.MEM_RESERVE, AccessProtectionFlags.PAGE_EXECUTE_READWRITE));
 }