I am writing an MFC application that doesn’t use .NET (CLR support is set to No Common Language Runtime support in the project settings). However, I get an SEHException thrown when I quit the application in Release build. Debug build gives me an assertion error, but the error window disappears in about half a second after it pops up (something I haven’t encountered before either) so I don’t get a chance to look at it.
So the main question is: how can an application that doesn’t have any managed code throw an Interop.SEHException?
An application without managed code can throw a SEHException because structured exception handling (SEH) is part of Win32, and predates the CLR. Here’s a link from January 1997 giving a crash course (hah!) on Win32 SEH.