- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have an application with a .NET 2.0 UI which calls a Fortran .dll to do the heavy lifting. Normally when the Fortran is finished control returns to the UI and the results are displayed. In some cases I'd like to terminate the Fortan early, say when I discover an error and need to return for the user to correct. Unfortunately if I use STOP, CALL ABORT, or CALL EXIT the command shuts down everything including the UI. How can I terminate the Fortran .dll without killing the UI?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The best way is to return from the DLL routine. I'm not sure if it's possible to raise an exception that can get handled by the caller. Typically, one would structure the Fortran so that at each step, a status is passed back and if a failure is seen that status is returned up the chain.
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