Virtualallocex

[DllImport("Kernel32.dll", SetLastError = true)][return: MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)]
public static extern IntPtr VirtualAllocEx(IntPtr hProcess,
   IntPtr lpAddress,
   UIntPtr dwSize,
   uint flAllocationType,
   uint flProtect
);

Microsoft documentation: Link

Last updated