program call sum_1d_array_in_testsub_dll
! ...
    integer                ::  p
    pointer                :: (q, sum_1d_array)   ! this is non-standard 
                                                  ! (but a common extension)
    integer                ::  n
    real, dimension(100)   ::  array
    real                   ::  total

! ...
    p = loadlibrary    ("testsub.dll"C) ! the C at the end says -
                                        ! add a null byte as in C
    q = getprocaddress (p, "SUM_1D_ARRAY"C)
    call sum_1d_array  (n, array, total)
!
    end