Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DLL in DVF 6 ?

7 views
Skip to first unread message

Bart van der Ouderaa

unread,
Feb 4, 1999, 3:00:00 AM2/4/99
to
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.
according to the help of DVF; I should be able to investigate the
externals using quickview in winexplorer but, although i can find an
import table, i can't find an export table.
The Delphi code is straight out of the help, and the fortran project is
a dll project.
this is the fortran code:

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


Catherine Rees Lay

unread,
Feb 4, 1999, 3:00:00 AM2/4/99
to
In article <36B961B9...@Student.AenF.WAU.NL>, Bart van der Ouderaa
<Bart.vand...@Student.AenF.WAU.NL> writes
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.
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...

HTH

Catherine.
--
Catherine Rees Lay

Bart van der Ouderaa

unread,
Feb 4, 1999, 3:00:00 AM2/4/99
to

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

0 new messages