title: How to automatically monitor and limit resource of process on Windows
body: <p>On Linux, normally I use <code>ptrace</code> function to trace all syscall, and kill the process if the it tries to do anything harmful to my machine, such as <code>system("shutdown -s -t 00")</code> or so.</p>
  
  <p>Is there a way for me to do this on Windows?</p>
  
  <p>EDIT: I want to write Sandbox program to limit time and memory usage of its child that can work on both Windows and Linux, and now it can only run on Linux via <code>ptrace</code></p>