I am calling a Fortran DLL from Excel VBA, and have ben doing so successfully for years.
Now one of our engineering suppliers is using a 64-bit version of Office (we haven't migrated from Office 2007 yet).
Can someone help me with my interfaces?
I am using calls like
Private Declare Sub ApproxBayerDensity_F Lib "AHEAProps.dll" (TempC As Double, Value As Double, ByVal Units As String)
Call ApproxBayerDensity_F(T, Value, Units)
the Fortran side is like
Subroutine ApproxBayerDensity_F(TempC, Value, Units)
!DEC$ ATTRIBUTES DLLEXPORT, STDCALL, ALIAS:'ApproxBayerDensity_F' :: ApproxBayerDensity_F
!DEC$ ATTRIBUTES REFERENCE :: Units
Real (KIND=8),INTENT(IN) :: TempC(1)
Real (KIND=8),INTENT(OUT) :: Value(1)
Character (LEN=20),INTENT(INOUT) :: Units
For the 64-bit interface, I now need to use
Private Declare PtrSafe Sub ApproxBayerDensity_F Lib "AHEAProps.dll" (TempC As Double, Value As Double, ByVal Units As String)
Where the variables have to be compatible with the 64-bit Excel.
Do I need to change anything on the Fortran side?