Problemas with ORA_FFI
Date: Thu, 27 Jan 2000 03:30:37 -0800
Message-ID: <08f6992b.d25a2b70_at_usw-ex0110-076.remarq.com>
Hi,
[Quoted] I'm trying to work with a C foreign function in Forms 4.5
(win95), and i always get GPF on
DE15W32.DLL. I've tried everything i could think of, but
none worked. Could someone give me a help?
Below is the code, and after it the GPF:
package body cheque is
arq_dll varchar2(15) := 'dllname.dll';
lib_handle ora_ffi.libhandletype;
function ff_ler_cheque(ff_handle in ora_ffi.funchandletype,
timele in out pls_integer,
tambuff in pls_integer, lpappbuff in out varchar2)
return pls_integer;
pragma interface(c, ff_ler_cheque, 11265);
function ler_cheque(lpappbuff in out varchar2) return
pls_integer is
func_ler_cheque_handle ora_ffi.funchandletype;
w_lpappbuff varchar2(1024) := lpappbuff; w_timele pls_integer := 10; w_tambuff pls_integer := 0;
retorno pls_integer;
begin
func_ler_cheque_handle := ora_ffi.register_function
(lib_handle,'functionname');
if (ora_ffi.is_null_ptr(func_ler_cheque_handle)) then
message(‘Error: ora_ffi.register_function ler_cheque’);
raise form_trigger_failure;
end if;
ora_ffi.register_return(func_ler_cheque_handle, ora_ffi.c_long); ora_ffi.register_parameter(func_ler_cheque_handle, ora_ffi.c_long); ora_ffi.register_parameter(func_ler_cheque_handle, ora_ffi.c_long); ora_ffi.register_parameter(func_ler_cheque_handle, ora_ffi.c_char);
retorno := ff_ler_cheque(func_ler_cheque_handle, w_timele, w_tambuff,w_lpappbuff);
lpappbuff := w_lpappbuff;
return(retorno);
end;
begin
lib_handle := ora_ffi.load_library(null, arq_dll);
if (ora_ffi.is_null_ptr(lib_handle)) then message('Error: ora_ffi.load_library cheque'); end if;
end;
The GPF returned is:
F45DBG32 - invalid page fault on DE15W32.DLL _at_ 0137:00a20249.
Any help would be aprreciated.
Thanks,
Felipe Diniz
- Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful