Re: Oracle Foreign Function (ORA_FFI)

From: Karlis Ogsts <ogsts_at_cclu.lv>
Date: 1996/10/29
Message-ID: <55684u$a7n_at_news.latnet.lv>#1/1


Try the following:

  • PL/SQL package body ---------------- package body WinFunc is lh_Winfunc ora_ffi.libHandleType; fh_FileCopy ora_ffi.funcHandleType;
    function i_FileCopy(funcHandle ora_ffi.funcHandleType, SrcFile in out varchar2,DestFile in out varchar2) return pls_integer; /* ^^^^^^ ^^^^^^ */ pragma interace(C,i_FileCopy,11265);

function FileCopy(SrcFile in varchar2,DestFile in varchar2) return pls_integer is
  rc pls_integer;

/* There are INITIALIZED buffers for file names */

  BufferForSource varchar2(256):=rpad(' ',256);   BufferForDestiny varchar2(256):=rpad(' ',256);
/* MAX PATH LENGTH ^^^ ^^^
begin
  BufferForSource:=SrcFile;
  BufferForDestiny:=DestFile;
  rc:=i_FileCopy(fh_FileCopy,BufferForSource,BufferForDestiny);   return (rc);
exception when others then

    Message('Error='||TO_CHAR(rc));
    pause;
end;

I think it will work. If not, please, tell me ! Received on Tue Oct 29 1996 - 00:00:00 CET

Original text of this message