- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I met with the following problem:
I have two Fortran Dll files ("A", "B") and one main Fortran program ("C"), I loaded can access the specific address of one subroutine "a" of A when I run "C" by using Windows API, "loadlibrary" and "getprocaddress". Then I want to call the subroutine "a" from another Dll "B", of course, I passed the handle of "a" through "C" to "B" and gave the interface of "a" in "B".
But when I call "a" in B, I met with the problem :
"
fortrtl: severe (159): Program exception - breakpoint
...
"
It there some problems for my calling methods?
Thank you for your clarifications!
I have two Fortran Dll files ("A", "B") and one main Fortran program ("C"), I loaded can access the specific address of one subroutine "a" of A when I run "C" by using Windows API, "loadlibrary" and "getprocaddress". Then I want to call the subroutine "a" from another Dll "B", of course, I passed the handle of "a" through "C" to "B" and gave the interface of "a" in "B".
But when I call "a" in B, I met with the problem :
"
fortrtl: severe (159): Program exception - breakpoint
...
"
It there some problems for my calling methods?
Thank you for your clarifications!
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your DLL calling method, at least as you've described it, seems ok.It's unusual to get that specific error unless you're using an old compiler version and have uninitialized variable checking turned on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks! Steve!
When I load the Dll from my current Dll instead of main program, it seems work fine.
When I load the Dll from my current Dll instead of main program, it seems work fine.
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