Virtualprotect

[DllImport("Kernel32.dll", SetLastError = true)][return: MarshalAs(UnmanagedType.Bool)]
public static extern bool VirtualProtect(IntPtr lpAddress,
   UIntPtr dwSize,
   uint flNewProtect,
   out uint lpflOldProtect
);

Microsoft documentation: Link

Last updated