title: C++ Windows Program Detecting Program Exit | No GUI or console
body: <p>In my C++ Windows Program without a console or GUI I wan't to detect if the task is being cancelled/stopped.
  How can I achieve this?</p>
  
  <p>Thanks.</p>