title: Exception handling is failing when exception is thrown in windows API
body: <p>I am calling a windows function MagSetWindowSource(windows magnifier API). For some reason it is throwing an exception. I want to catch this exception but I am unable to do so.
  I tried</p>
  
  <pre><code>__try
  {
  
      MagSetWindowSource()
  
  }
  __except(EXCEPTION_EXECUTE_HANDLER)
  {
  }
  </code></pre>
  
  <p>and showed <em>an unhandled exception was encountered during a user callback</em> message.I tried all C++ exceptions flags (/EHa, /EHSc, etc) in Visual Studio.
  Any help in this matter is appreciated.</p>