! DLLa.F90 Copyright(c) 1994 - 1998, Lahey Computer Systems, Inc. ! Copying for sale requires permission from Lahey Computers Systems. ! Otherwise, distribution of all or part of this file is permitted ! if these four lines are included. ! ! DLLa.F90, This DLL is for use with the MAIN1 example. ! Please refer to the MK3_FF.BAT and MK3_CF.BAT files for ! instructions for building this example ! ! This example demonstrates 'simple' interfaces between ! DLL and MAIN, using intrinsic data types ! This DLL works with both an LF95 MAIN and a C MAIN. INTEGER FUNCTION dlla(pass) DLL_EXPORT dlla ! make this available through the DLL interface DLL_IMPORT dllb ! this makes dllb available to dlla DLL_IMPORT dllc ! because dllc is exported, we must import it or ! it will not be available. The link warning 4049 ! can be ignored. type passargs real :: a, a1(10) integer :: i, i1(10) logical :: l, l1(10) end type passargs type (passargs) :: pass pass%a= 1.23 pass%i = 9876 call dllc(pass%l) pass%a1 = (/(ido, ido=1, 20,2)/) ! odd values pass%i1 = (/(ido, ido=2, 20,2)/) ! even values call dllb(pass%l1) dlla = 9999 RETURN END SUBROUTINE dllc(l) DLL_EXPORT dllc ! make this available through the DLL interface LOGICAL l l = .TRUE. RETURN END