A script-enabled browser is required for this page to function properly.

ORA_FFI.LOAD_LIBRARY built-in function

This function loads a specified dynamic library so that its functions can be registered.

Syntax


FUNCTION ORA_FFI.LOAD_LIBRARY
(dirname VARCHAR2,libname VARCHAR2)
RETURN libHandleType;

Parameters

Parameter

Description

dirname

The directory in which the library is located.

libname

The filename of the library.

Returns

A handle to the foreign library. It returns a null handle if the library was unable to be found or loaded.

Example


/* This example uses ORA_FFI.LOAD_LIBRARY */
PACKAGE test is
  /* Declare testlib_lhandle as an ORA_FFI
  library handle varible type. */
  testlib_lhandle ORA_FFI.LIBHANDLETYPE;
  ...
END; 
  
PACKAGE BODY test IS
 PROCEDURE register_libs IS
  BEGIN
    /* Load the dynamic link library 'test.dll'
    from the directory C:\libdir\ and return
    the handle testlib_lhandle. */
    testlib_lhandle := ORA_FFI.LOAD_LIBRARY
    ('C:\libdir\','test.dll');
  ...
  END;
...
END;

See also

About the ORA_FFI built-in package

ORA_FFI built-in package