Virtualprotectex
[DllImport("Kernel32.dll", SetLastError = true)][return: MarshalAs(UnmanagedType.Bool)]
public static extern bool VirtualProtectEx(IntPtr hProcess,
IntPtr lpAddress,
UIntPtr dwSize,
uint flNewProtect,
out uint lpflOldProtect
);
Microsoft documentation: Link
Last updated