- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
It seems that not every Windows API subroutine can be accessed from Fortran. I think that it can be done, however.
Could anyone show an example of AfxEndThread function call from Fortran code?
regards,
Maciej
It seems that not every Windows API subroutine can be accessed from Fortran. I think that it can be done, however.
Could anyone show an example of AfxEndThread function call from Fortran code?
regards,
Maciej
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
AfxEndThread is an MFC (Microsoft Foundation Class) routine - it would typically be called from C++. I don't see in the MSDN documentation information on a supplied linkable library it is defined in.
It is true that there are some APIs which COULD be called from Fortran but don't have interfaces supplied. We add these as we can.
It is true that there are some APIs which COULD be called from Fortran but don't have interfaces supplied. We add these as we can.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
AfxEndThread is an MFC (Microsoft Foundation Class) routine - it would typically be called from C++. I don't see in the MSDN documentation information on a supplied linkable library it is defined in.
It is true that there are some APIs which COULD be called from Fortran but don't have interfaces supplied. We add these as we can.
It is true that there are some APIs which COULD be called from Fortran but don't have interfaces supplied. We add these as we can.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From what I read on the web, calling AFxEndThread from outside is not a good idea, e.g. "The problem with calling AfxEndThread yourself is that it won't unwind the stack and destroy local variables, which can cause memory leaks for objects". If you want to end a thread, use PostThreadmessage or PostQuitmessage().
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