- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
written this piece of code in order to use a subroutine contained in a DLL file from a Fortran program.
interface
subroutine dll_test(na,array1,nb,array2)
integer :: na,nb
real*4, dimension(na) :: array1
real*4, dimension(nb) :: array2
end subroutine dll_test
end interface
integer p1
pointer (t,dll_test)
!------------------------------------------------------------
integer,parameter :: nat=15
integer,parameter :: nbt=15
real*4,dimension(nat) :: array1t
real*4,dimension(nbt) :: array2t
!------------------------------------------------------------
p1=loadlibrary('dll_name.dll'C)
t=getprocaddress(p1,"subroutine_name"C)
if (t==0) then
print*,'error opening subroutine in DLL'
endif
call dll_test(nat,array1t,nbt,array2t)
My fortran code does not recognize the statements loadlibrary and getprocaddress.
What am I missing?? Of course I cannot load the DLL....
Regards,
Paolo
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page