I would like to convert the following fixed format code from MS Developer Studio to free format in FTN95.
! Special interface to use 32 bit Windows 'C' Library BTRCALL routine
! contained in WBTRV32.LIB
INTERFACE TO INTEGER*4 FUNCTION BTRCALL
+ [STDCALL,ALIAS:'_BTRCALL@28' ](ARG1[VALUE]
+ ,ARG2[REFERENCE]
+ ,ARG3[REFERENCE]
+ ,ARG4[REFERENCE]
+ ,ARG5[REFERENCE]
+ ,ARG6[VALUE]
+ ,ARG7[VALUE])
INTEGER*4 ARG1
CHARACTER*128 ARG2
CHARACTER*(*) ARG3
INTEGER*4 ARG4
CHARACTER*(*) ARG5
INTEGER*4 ARG6
INTEGER*4 ARG7
END
Should I be using C_EXTERNAL? Or maybe something similar to the following:
!Special interface to use 32 bit Windows 'C' Library BTRCALL routine
!contained in WBTRV32.LIB
interface
STDCALL BTRCALL '_BTRCALL@28' (VAL,REF,REF,REF,REF,VAL,VAL):INTEGER*4
INTEGER*4 arg1
CHARACTER (LEN=128) :: arg2
CHARACTER (LEN=*) :: arg3
INTEGER*4 arg4
CHARACTER (LEN=*) :: arg5
INTEGER*4 arg6
INTEGER*4 arg7
END FUNCTION BTRCALL
end interface
With this, I get a the following errors: Nesting error - the INTERFACE construct on line 3 has been terminated ARG3 cannot have the type CHARACTER (LEN=*) :: arg3 as it is not a dummy argument...
Any ideas on how to best handle this?