title: How to set MinWorkingSet and MaxWorkingSet in a 64-bit .NET process?
body: <p>How do I set MinWorkingSet and MaxWorking set for a 64-bit .NET process?</p>
  
  <p>p.s. I can set the MinWorkingSet and MaxWorking set for a 32-bit process, as follows:</p>
  
  <pre><code>[DllImport("KERNEL32.DLL", EntryPoint = "SetProcessWorkingSetSize", SetLastError = true, CallingConvention = CallingConvention.StdCall)]
  internal static extern bool SetProcessWorkingSetSize(IntPtr pProcess, int dwMinimumWorkingSetSize, int dwMaximumWorkingSetSize);
  
  [DllImport("KERNEL32.DLL", EntryPoint = "GetCurrentProcess", SetLastError = true, CallingConvention = CallingConvention.StdCall)]
  internal static extern IntPtr MyGetCurrentProcess();
  
  // In main():
  SetProcessWorkingSetSize(Process.GetCurrentProcess().Handle, int.MaxValue, int.MaxValue);
  </code></pre>