To prevent the exception handler from being called recursively, or to prevent the exception handler from being called again if it throws an exception, you can use a spin-wait exception handler.
When putting this into practice, you may want to write a minidump file when an unhandled exception occurs. This can be done using the MiniDumpWriteDump function.
Demonstrating of how these functions can be used together, along with reporting the exception through the Windows Error Reporting API can be found in WERCrashApp.