- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A client gave me a FORTRAN DLL but no LIB. He also specified the name of the DLL entry point. I've never integrated a DLL without including the LIB in my main FORTRAN project.
Thanks!
Thanks!
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You'll want to use LoadLibrary and GetProcAddress as shown in the LOADEXP1 example that comes with the compiler.
James
James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Sorry for my poor English, I use a machine translation.
You can use the utility "makilib" available on Cd VF6.6 in ' X86USUPPORTMISC' to create a library static, to include at link, containing all definitions exported from your DLL.
Then it is necessary, in each subroutine, to include a declaration of interface. for example (for psapi.dll)
!*
!* ***** PSAPI.LIB Interfaces *****
!*
interface
logical(4) function EnumProcesses( lpidProcess, cb, lpcbNeeded )
!DEC$ ATTRIBUTES STDCALL, ALIAS:'_EnumProcesses' :: EnumProcesses
integer lpidProcess, cb, lpcbNeeded
end function EnumProcesses
end interface
and to use your function as usual.
Have a nice developement.
Sorry for my poor English, I use a machine translation.
You can use the utility "makilib" available on Cd VF6.6 in ' X86USUPPORTMISC' to create a library static, to include at link, containing all definitions exported from your DLL.
Then it is necessary, in each subroutine, to include a declaration of interface. for example (for psapi.dll)
!*
!* ***** PSAPI.LIB Interfaces *****
!*
interface
logical(4) function EnumProcesses( lpidProcess, cb, lpcbNeeded )
!DEC$ ATTRIBUTES STDCALL, ALIAS:'_EnumProcesses' :: EnumProcesses
integer lpidProcess, cb, lpcbNeeded
end function EnumProcesses
end interface
and to use your function as usual.
Have a nice developement.
Not applicable
09-20-2012
10:36 PM
743 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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