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

ORA_FFI.Load_Library

Description

Loads a specified dynamic library so that its functions can be registered.

Syntax


FFUNCTION 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;