ORA_FFI.REGISTER_RETURN
built-in procedureThis procedure registers the return type of the specified foreign function.
PROCEDURE ORA_FFI.REGISTER_RETURN
(funchandle funcHandleType,
creturntype PLS_INTEGER);
PROCEDURE ORA_FFI.REGISTER_RETURN
(funchandle funcHandleType,
creturntype PLS_INTEGER,
plsreturntype PLS_INTEGER);
Parameter |
Description |
funchandle |
A function handle returned by |
|
The C datatype returned by the foreign function. The value of this argument may be one of the following packaged constants:
|
|
The corresponding PL/SQL return type (optional). |
/* Define Procedure define_c_funcs which calls two
ORA_FFI functions, getresult and foo. */
PROCEDURE define_c_funcs is
getresult_fhandle ORA_FFI.FUNCHANDLETYPE;
foo_fhandle ORA_FFI.FUNCHANDLETYPE;
BEGIN
/* Register the info for function getresult */
getresult_fhandle := ORA_FFI.REGISTER_FUNCTION
(testlib_lhandle,'getresult');
/* Register the return type for function getresult */
ORA_FFI.REGISTER_RETURN
(getresult_fhandle, ORA_FFI.C_CHAR_PTR);
/* Register the info for function foo */
foo_fhandle := ORA_FFI.REGISTER_FUNCTION
(testlib_lhandle,'foo');
/* Register the return type for function foo */
ORA_FFI.REGISTER_RETURN
(foo_fhandle, ora_ffi.C_SHORT);
...
/* Generate PL/SQL package containing all
functions defined in test library */
ORA_FFI.GENERATE_FOREIGN
(testlib_lhandle, 'test_ffi_pkg');
...
END;
About the ORA_FFI
built-in package
Copyright © 1984, 2005, Oracle. All rights reserved.