示例#1
0
        public static ulong AllocateAndWrite(this Process process, byte[] buffer, NT.AllocationType allocationType, NT.MemoryProtection memoryProtection)
        {
            ulong allocatedMemory = process.AllocateMemory((uint)buffer.Length, allocationType, memoryProtection);

            process.WriteRawMemory(buffer, allocatedMemory);

            return(allocatedMemory);
        }
示例#2
0
 public static ulong AllocateMemory(this Process process, uint length, NT.AllocationType allocationType, NT.MemoryProtection memoryProtection) =>
 NT.VirtualAllocEx(process.Handle, 0, length, allocationType, memoryProtection);