Software Archive
Read-only legacy content
17060 Discussions

SIGNALLQQ not working

Intel_C_Intel
Employee
1,776 Views
Hello,
I compiled sigtest (DF98SAMPLESTUTORIAL) as a DLL. It works fine as long as the executable is a FORTRAN one. When I try to call the DLL from VB executable, it fails (the DLL is found and executed, but the exception handling does not take place). Is there any other way of making sure that your FORTRAN DLL, once generated a run-time error, will not crash, but return controll to the calling VB executable and write some kind of information about an error?

Thanks for comments,
Dorota
0 Kudos
3 Replies
Intel_C_Intel
Employee
1,776 Views
If the sigtest sample is compiled, without changes, in a DLL project it will crash the calling VB app upon the first write(*, *) statement - before ever getting around to testing exception handling code - because VB doesn't have a console to write to.

The Programmer's Guide provides a fairly detailed treatment of exception handling, including from CVF dlls. See these three chapters: Handling Run-Time Errors, The Floating-Point Environment, and Advanced Exception and Termination Handling Considerations.

hth,
John
0 Kudos
Steven_L_Intel1
Employee
1,776 Views
Visual Fortran exception handling requires that the main program be Fortran, so that the Fortran exception handler can be established. With a DLL, things are a lot more difficult. As John says, the Programmer's Guide discusses this.

Steve
0 Kudos
Intel_C_Intel
Employee
1,776 Views
The Advanced Exception and Termination Handling Considerations chapter of the programmer's Guide may have been new in 6.5. The 6.5A Programmer's Guide is available for download in pdf format at http://www.compaq.com/fortran/docs/. IMO, it'd be nice if it was available online in HTML too.

-John
0 Kudos
Reply