Is it possible to throw exceptions in an unmanaged DLL and handle it in a managed application?
My unmanaged C++ DLL throws exceptions in case of errors, and they should be handled in the calling executable application.
CMyFileException *x = new CMyFileException;
throw(x);
This previously worked, but now the application is compiled with different flags (/clr etc) cause we need to use some managed code. When the exception is thrown, I receive a System.ExecutionEngineException which does not seem to be caught even with catch(...) in my calling exe.
I have seen that compiler option /clr implies /EHa for the exception handling, but this seemed to be the option to select as far as I understand it now.
Would there be any other alternative (compiler/linker setting) to throw and catch exceptions over module (DLL/exe) boundaries?
Thanks for your support! Marco