      function ccall.getfn2(libname,fnname)
*
*
*
*
*
*
*
*
*
$catalog local
*
$include ccall.common
*
      if cc$nul4 = '0' then
         call ccall.init
      end
*
      locate(fnname,c.fnnames;l) then
         fn.handle = c.fns[(l*4)-3,4]
         return(fn.handle)
      end
*
      lib.handle = ccall.getlib(libname)
      if lib.handle = '' then
         display 'cannot load lib ' : libname
         stop
      end
      fn.handle = ccall.getfn(lib.handle,fnname)
      if fn.handle = '' then
         display 'cannot get symbol address for fn ' : fnname
         stop
      end
*
      return(fn.handle)
   end
