This is mostly curiosity, but I've been reading about the history of Visual Studio catching SEH exceptions in a C++ try-catch
construct. I keep running across the assertion that older version Visual Studio with the /GX flag enabled would "somtimes" catch structured Win32 exceptions in a C++ catch
block.
Under what circumstances will Visual Studio 6.0 enter the catch block in the following code when built with the /GX flag?
char * p = NULL;
try
{
*p = 'A';
}
catch(...)
{
printf("In catch\n");
}
In my own simple tests with Visual Studio 6 + SP6 program execution halts with an unhanded exception and "In catch" is never printed. However, some articles (like this one) lead me to believe that it's possible to enter the catch
block.