- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
-John
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page