I have a Delphi 2010 DLL loaded in a Delphi 2010 app. It works fine for the most of the time. But there are some exceptions that escapes from the DLL (even those that are treated by a try..except
block) and my application crash with no error message, no information at all. The exceptions what I am talking about are like AV, not like the exceptions raised by the developer. I have tried loading the DLL with SafeLoadLibrary
without luck. I also have the app and DLL source code. I am not posting the DLL or the app source code because I can't, they are copyrighted (I really wish I could).
Is there anything I can do to avoid an internal DLL exception to crash my app?
EDIT
I have no way of not allowing the DLL to raise an exception. It can happens, not all codes are perfect. It may be inevitable that the dll raises an exception, but it should not crash the main app. Imagine, for example, that you are using a third party dll which you have no source code. Its not a good thing that when this dll crashs for some reason your main app get killed. It must have an way of not allowing that to happen.
TerminateProcess()
, or something similar, to me. – David Heffernan