given a DLL with no LIB

given a DLL with no LIB

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.

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

You'll want to use LoadLibrary and GetProcAddress as shown in the LOADEXP1 example that comes with the compiler.



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 *****
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.

Leave a Comment

Please sign in to add a comment. Not a member? Join today