I'm getting a 0xC0000005 exception (0xC0000005: Access violation reading location 0x00000004.) when a COM function doesn't return. This is a very edge case, however it still needs to be caught in the C++ code that is calling it. For some reason, this exception is not being caught using a 'catch all' and I can't figure out why.
Here's the problematic code:
try
{
p_rsFuncResult = (LPCTSTR)myPtr->myFunction(p_szFuncInput);
}
catch (std::exception& e)
{
LOG_FATAL << "Uncaught exception thrown in myFunction: " << e.what();
p_rsFuncResult = "";
}
I've also tried catching using just '...', but this code still isn't being hit. It's worth noting as well that everything works as expected when the COM function returns as expected.
Can anyone provide any insight into this?