I have problems with Fortran when accessing external DLL. I'm not familiar with Fortran. Error showing here stdcall external LoadLibraryA, GetProcAddress
. The code as below:
Subroutine GetDLLEntryPoint (EntryPoint,ModuleName)
stdcall external LoadLibraryA, GetProcAddress !error here
integer*4 LoadLibraryA, GetProcAddress
integer*4 pl, plvalue, EntryPoint
integer *4 pm
character*100 LibraryName, ModuleName
EntryPoint=0
LibraryName = "MY.DLL"//char(0)
pl = loc(LibraryName)
plvalue = LoadLibraryA(val(pl))
if (plvalue.ne.0) then
pm = loc(ModuleName)
EntryPoint = GetProcAddress (val(plvalue), val(pm))
endif
RETURN
end
The error in the Absoft Fortran compiler is:
error LNK2001: unresolved external symbol _loadlibrarya_@4
error LNK2001: unresolved external symbol _getprocaddress_@8