Mixed mode C++ project. Native code is calling managed code. Managed code might throw an exception. I can catch said exception in native mode using a vectored exception handler; I can see its PEXCEPTION_POINTERS. The telling code 0xE0434F4D, meaning it’s a CLR exception, is there.
Question: is there any way to get any sensible information (exception class, message, stack trace etc.) from the attendant data? There’s one parameter in the ExceptionInformation, and it looks like a pointer to something…
No, that’s too late. All you got is the exception code. You might get something in ExceptionInformation if the original managed exception was caused by a processor fault. Like NullReference or AccessViolation. This won’t be helpful since you don’t know the original SEH exception anymore. Using COM give you a better mouse trap, the CLR implements IErrorInfo. But the managed code you’re trying to run is probably not [ComVisible]. Calling the code through a managed stub that catches Exception might be a better angle.