- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I have to write a series of Fortran DLLs for a third party package written in Object Pascal. My problem is how to set up the calling convention - such documentation as I have is inadequate. According to my understanding, the following should work ...
I have to write a series of Fortran DLLs for a third party package written in Object Pascal. My problem is how to set up the calling convention - such documentation as I have is inadequate. According to my understanding, the following should work ...
real*4 function banet(age)
!DEC$ ATTRIBUTES DLLEXPORT,STDCALL ::banet
!DEC$ ATTRIBUTES VALUE :: age
implicit none
real*4 age
banet = 45.82*(1-exp(-0.0293*age))**0.6311
return
end function banet
... but it doesn't. Does anyone have any insights or clues about this?
With many thanks in advance,
Mike
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you sure about the VALUE attribute? Actually, you'll get VALUE by default with STDCALL - you might want to try REFERENCE. What doesn't work? What does the Delphi declaration look like?

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page