subroutine Testdll(test)
!dec$ attributes dllexport,stdcall :: Testdll
double precision test
test = 12.3445
end subroutine
This should work. Am I missing something ?
Thanks in advance
Bart van der Ouderaa
bart.vand...@student.aenf.wau.nl
HTH
Catherine.
--
Catherine Rees Lay
Catherine Rees Lay wrote:
> In article <36B961B9...@Student.AenF.WAU.NL>, Bart van der Ouderaa
> <Bart.vand...@Student.AenF.WAU.NL> writes
> >Hi,
> >I'm trying to create a DLL in Fortran and use it in a Delphi app,
> >however The Delphi App can't seem to get the reference of the external
> >function.
>
> >This should work. Am I missing something ?
> >
> >Thanks in advance
> >Bart van der Ouderaa
> >bart.vand...@student.aenf.wau.nl
> >
> >
> >
> A couple of pointers (it's a bit since I did this...)
> 1) what's the routine exported as? You may find it's something like
> Test@4, rather than just test. If so you'll need to use ALIAS as a DEC
> attribute to rename it, since Delphi won't let you have an @ in a
> routine name.
I looked at the test.exp for once, and you're right, it was a different
name.
I didn't use the external clause yet, as I was trying to see were it went
wrong
I used getprocaddres to get to the subroutine and correcting it did the
trick.
> 2) If you already checked this, beware that the name in the Delphi
> import directive (the one which has the DLL name in it) is CASE
> SENSITIVE. It took me ages to work that one out...
case sensitivety scares me already so that was no problem :)
HTH
>
> Catherine.
> --
> Catherine Rees Lay
Thanks