I'd really appreciate some advice on this topic. Consider the following situation:
Fortran code does some work and I purposely turn on bounds checking and assign to an out-of-bounds item. When compiled as a stand-alone EXE, I get an error on the screen that makes sense.
If I slightly modify the code (remove the Program and add StdCall) and recompile as DLL, then call the same routine from VB.Net, the same error causes my VB.Net application to just stop, with no warning. I have the call to the Fortran app in a separate thread, but still I am not able to trap the error. (The calls to the DLL work fine when I don't force the error in the Fortran code, so VB.Net is communicating nicely with the DLL).
Even if I can't get any really useful information back from the Fortran DLL about why it crashed, I still want to prevent my UI from dying.
I read in the manual about trapping IEEE errors, but that doesn't seem practical for the entire application, and doesn't handle all types of runtime errors.
Can someone please advise me?
Thanks
Chris