Loads a specified dynamic library so that its functions can be registered.
FFUNCTION Ora_Ffi.Load_Library
(dirname VARCHAR2,
libname VARCHAR2)
RETURN libHandleType;
Parameter | Description |
---|---|
dirname | The directory in which the library is located. |
libname | The filename of the library. |
A handle to the foreign library. It returns a null handle if the library was unable to be found or loaded.
/* 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;