title: Prevent Windows shutdown with custom message
body: <p>VMWare Workstation does something quite cool when I try to shutdown Windows while a Virtual Machine is running:</p>
  
  <p><img src="https://i.stack.imgur.com/bH508.png" alt="VMWare prevents Windows shutdown with a custom message"></p>
  
  <p>Normally, we'd see a "This program is preventing Windows from shutting down" message instead of the new "1 Virtual Machine is in use". </p>
  
  <p>How does VMWare do this? I haven't been able to find any APIs about it on Google.</p>