ORA_FFI Package

I'm not familait with 'ORA_FFI' can someone give hi-level highlights of the 3 main functions and what do they do (ORA_FFI.LOAD_LIBRARY,ORA_FFI.REGISTER_FUNCTION,ORA_FFI.REGISTER_PARAMETER)
Also a link for more details will be appreciated
“ libhandle := ORA_FFI.LOAD_LIBRARY(dirname, libname);
funchandle := ORA_FFI.REGISTER_FUNCTION(libhandle,'purchase',ORA_FFI.C_STD);
ORA_FFI.REGISTER_PARAMETER(funchandle,ORA_FFI.C_CHAR_PTR); --id
ORA_FFI.REGISTER_PARAMETER(funchandle,ORA_FFI.C_CHAR_PTR); --plan
ORA_FFI.REGISTER_PARAMETER(funchandle,ORA_FFI.C_CHAR_PTR); --v3careercreatedate
ORA_FFI.REGISTER_PARAMETER(funchandle,ORA_FFI.C_CHAR_PTR); --jurisdiction
ORA_FFI.REGISTER_PARAMETER(funchandle,ORA_FFI.C_CHAR_PTR); --membertype
ORA_FFI.REGISTER_PARAMETER(funchandle,ORA_FFI.C_CHAR_PTR); --transdate
ORA_FFI.REGISTER_PARAMETER(funchandle,ORA_FFI.C_INT_PTR); --warning
ORA_FFI.REGISTER_PARAMETER(funchandle,ORA_FFI.C_CHAR_PTR); --warningmsg
ORA_FFI.REGISTER_PARAMETER(funchandle,ORA_FFI.C_INT_PTR); --error
ORA_FFI.REGISTER_PARAMETER(funchandle,ORA_FFI.C_CHAR_PTR); --msg

I found a link
http://www.oracle.com/webapps/online-help/reports/10.1.2/state/content/navId.3/navSetId._/vtTopicFile.htmlhelp_rwbuild_hs%7Crwrefex%7Cplsql%7Cbuiltins%7Coraffi%7Cpkg_ffi%7Ehtm/

Similar Messages

  • Migration to Forms 10G -  modify ORA_FFI package usage?

    Hello all.
    I have been working on the migration of an application from Forms 4.5 to Forms 10G. In the 4.5 version the application interacts with a third party tool installed on the same "Windows" machine where the forms code is placed. The application uses the ORA_FFI package to do this.
    On our target version uses Oracle 10G AS on "IBM AIX" machine. Can we install the third party tool on the IBM Machine and continue using ORA_FFI package? What are the additional factors that we need to consider and what changes if any are reqiured in the forms code?
    Thanks in advance
    Regards
    Kranthi

    You first have to instantiate your class:
    DECLARE
      obj   ORA_JAVA.JOBJECT;
    BEGIN
      obj:=CLASSFORMS.new;     
      MESSAGE(CLASSFORMS.SALUDO(obj));
      MESSAGE(' ');
    END;

  • Doubt in ORA_FFI(Its urgent)

    Hi,
    I've created a test.dll which contains caps func as follows:
    int caps()
         int * ptr=0x417;
         if (*ptr==64)
              return 1;
    else
    return 0;
    Then I called this func through ORA_FFI package..
    DECLARE
    dll_handle ORA_FFI.LIBHANDLETYPE;
    winexec_handle ORA_FFI.FUNCHANDLETYPE;
    vn_ret PLS_INTEGER;
    FUNCTION Runp( handle IN ORA_FFI.FUNCHANDLETYPE)
    RETURN PLS_INTEGER;
    PRAGMA INTERFACE(C, Runp, 11265);
    BEGIN
    break;
    dll_handle := ORA_FFI.REGISTER_LIBRARY(NULL,'test.dll');
    winexec_handle := ORA_FFI.REGISTER_FUNCTION(dll_handle,'caps');
    ORA_FFI.REGISTER_RETURN(winexec_handle,ORA_FFI.C_INT);
    vn_ret := Runp(winexec_handle);
    IF vn_ret = 2 THEN
    MESSAGE('Cannot find file ' );
    END IF;
    EXCEPTION WHEN OTHERS THEN
    FOR i IN 1..Tool_Err.NErrors LOOP
    message(Tool_Err.Message);
    Tool_Err.Pop;
    END LOOP;
    END;
    When I debug this code,It gives error as caps func not found in test.dll.
    But the only func in test.dll is caps..
    I'm using forms 6i in client server mode.
    I created test.dll using Microsoft visual c++ by creating new win32 Dynamic link library.
    One more doubt:
    How can I find functions in a already compiled DLL?
    Pls reply me..Its urgent..
    Adios..
    Prashanth Deshmukh

    Hi,
    refer these ,u will get some help
    Standard Buttons:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/webDynproABAP-ALVControllingStandard+Buttons&
    alv-pfstatus:
    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_pfstatus.htm
    then how to capture that button click.
    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_ucomm.htm
    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_rowsel.htm

  • Using ora_ffi to run window application

    Does anyone know how to use ora_ffi package to call a window
    application? ( I did not use host command because I wish to go
    back to the calling form. ) Thanks.
    null

    can write without a package too, in a trigger. This code is with error checking
    DECLARE
    dll_handle ORA_FFI.LIBHANDLETYPE;
    winexec_handle ORA_FFI.FUNCHANDLETYPE;
    vn_ret PLS_INTEGER;
    FUNCTION Runp( handle IN ORA_FFI.FUNCHANDLETYPE,
    cmd IN OUT VARCHAR2,
    disp_mode IN PLS_INTEGER)
    RETURN PLS_INTEGER;
    PRAGMA INTERFACE(C, Runp, 11265);
    BEGIN
    dll_handle := ORA_FFI.REGISTER_LIBRARY(NULL,'kernel32.dll');
    winexec_handle := ORA_FFI.REGISTER_FUNCTION(dll_handle,'WinExec');
    ORA_FFI.REGISTER_RETURN(winexec_handle,ORA_FFI.C_INT);
    ORA_FFI.REGISTER_PARAMETER(winexec_handle,ORA_FFI.C_CHAR_PTR);
    ORA_FFI.REGISTER_PARAMETER(winexec_handle,ORA_FFI.C_INT);
    vn_ret := Runp(winexec_handle,:control.path ,1);
    IF vn_ret = 2 THEN
    MESSAGE('Cannot find file ' | | :control.path);
    END IF;
    EXCEPTION WHEN OTHERS THEN
    FOR i IN 1..Tool_Err.NErrors LOOP
    message(Tool_Err.Message);
    Tool_Err.Pop;
    END LOOP;
    END;

  • ORA_FFI.LOAD_LIBRARY

    Dear Oracle friends
    I'm new to using of ORA_FFI package
    I have a code which is doind an open ORA_FFI.LOAD_LIBRARY the name and path are ok
    I'm getting ORA-304500 ?? please help ??
    Thanks

    ORA_FFI is a Forms library. Consequently you would be better off asking the question in Forms.
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • Importing Vb Dll in Oracle Forms 6i

    If any one have idea importing vb dll in oracle forms 6i. If any one have idea to Use ORA_FFI package or any other way.

    The Forms Builder Help is the best source of information. It has plenty of examples too, like this one I copied from the Help:
    /* Find foreign library handle for
       a given library name */
    BEGIN
       libhandle := ora_ffi.find_library
                ('mylib.dll');
    END;

  • Use of DLL file in d2k

    Can I use dll file in Developer/2000? If yes how can i use?

    Tanks for your suggestion. It is working
    sanaul.
    yes,
    Check out the documentation on the ORA_FFI package.

  • How to use DLL function in Oracle Forms 5.0?

    for instance, the FindWindowA function in "user32.dll"
    please advise, thanks

    Take a look at ORA_FFI package.

  • How to simulate Excel's Drag & Drop in Oracle Forms 5.0

    Dear OTN Members,
    In my current application, we have to design a tabular block,
    and the we have provide the user a push button or some thing so
    that the following functionalities are attained :
    1. Right Click to copy the whole record.
    2. Move to another record by keyboard or scroll bar, and left
    clicks to merge the values there with the copied one. After this
    the copied column should be deleted or cleared.
    3. One key to cancel the copied value(ie Undo key).
    Help me with some solution, because this is the important point
    in our development.
    Thanks
    MS GANESH
    null

    Take a look at ORA_FFI package.

  • Setting widows environment variable like "path "

    I want to set a new value for windows environment variable path. Is there any way to set change the varibale.

    You could also use ORA_FFI package to call Windows API function SetEnvironmentVariable. There is an example below.
    See also:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/setenvironmentvariable.asp
    kernel_lhandle Ora_Ffi.Libhandletype;
    GetEnvironmentVariable_fhandle Ora_Ffi.Funchandletype;
    SetEnvironmentVariable_fhandle Ora_Ffi.Funchandletype;
    FUNCTION ff_GetEnvironmentVariable(
    fhandle Ora_Ffi.funchandletype,
    lpName varchar2,     -- address of environment variable name
    lpBuffer varchar2,     -- address of buffer for variable value
    nSize      pls_integer -- size of buffer, in characters
    ) RETURN pls_integer;
    PRAGMA interface( C, ff_GetEnvironmentVariable, 11265 );
    FUNCTION ff_SetEnvironmentVariable(
    fhandle Ora_Ffi.funchandletype,
    lpName varchar2,     -- address of environment variable name
    lpValue varchar2     -- address of variable value
    ) RETURN pls_integer;
    PRAGMA interface( C, ff_SetEnvironmentVariable, 11265 );
    function SetEnvironmentVariable(lpName varchar2, lpValue varchar2) return pls_integer IS
    BEGIN
    return ff_SetEnvironmentVariable( SetEnvironmentVariable_fhandle, lpName, lpValue );
    END;
    function GetEnvironmentVariable(
    lpName varchar2
    ) return varchar2 as
    lpBuffer char(2000);     -- address of buffer for variable value
    nSize      pls_integer; -- size of buffer, in characters
    res pls_integer;
    begin
    lpBuffer:='*';
    nSize:=2000-1;
    res:=ff_GetEnvironmentVariable(
    GetEnvironmentVariable_fhandle,
    lpName,
    lpBuffer,
    nSize );
    if res>0 then
    return substr( lpBuffer, 1, res );
    else
    return null;
    end if;
    end;
    -- Initialization
    /* Load the library */
    kernel_lhandle:=Ora_Ffi.Load_library
    ( '', 'kernel32.dll' );
    /* GetEnvironmentVariable */
    GetEnvironmentVariable_fhandle:=Ora_Ffi.Register_Function
    ( kernel_lhandle, 'GetEnvironmentVariableA', Ora_Ffi.C_Std );
    Ora_Ffi.Register_Parameter
    ( GetEnvironmentVariable_fhandle, Ora_Ffi.C_CHAR_PTR );
    Ora_Ffi.Register_Parameter
    ( GetEnvironmentVariable_fhandle, Ora_Ffi.C_CHAR_PTR );
    Ora_Ffi.Register_Parameter
    ( GetEnvironmentVariable_fhandle, Ora_Ffi.C_INT );
    Ora_Ffi.Register_Return
    ( GetEnvironmentVariable_fhandle, Ora_Ffi.C_INT );
    /* SetEnvironmentVariable */
    SetEnvironmentVariable_fhandle:=Ora_Ffi.Register_Function
    ( kernel_lhandle, 'SetEnvironmentVariableA', Ora_Ffi.C_Std );
    Ora_Ffi.Register_Parameter
    ( SetEnvironmentVariable_fhandle, Ora_Ffi.C_CHAR_PTR );
    Ora_Ffi.Register_Parameter
    ( SetEnvironmentVariable_fhandle, Ora_Ffi.C_CHAR_PTR );
    Ora_Ffi.Register_Return
    ( SetEnvironmentVariable_fhandle, Ora_Ffi.C_INT );
    To change the variable PATH you could use something like the following code:
    s:=dll_path||';'||WIN32.GetEnvironmentVariable( 'PATH' );
    res:=WIN32.SetEnvironmentVariable( 'PATH', s );

  • How to execute Pro*C file from form

    Hi All !
    I have one pro*c file(.pc & .exe) . How I can execute this file from form.
    Regards,
    Neeraj

    I think you could use Ora_Ffi package too. Make sure that you use correct version of Pro/C.
    I think you should use Pro/C version 8.0.x with Forms 6.0. I don't use Forms 6i, but I think it is the same for it too.

  • To call a VB DLL.

    It is possible to use a function from Visual Basic DLL. I created the DLL. But if i use the ORA_FFI package, its nt working. I used an example with no parameters. Please help...Maybe the ORA_FFI package works only with C DLL'S ....

    Have you checked google?
    First hit. Reply 17.

  • Forms hanging after multiple calls to Foreign Function Interface

    Hi,
    Can anyone help me with this problem. I'm getting a 'FRM-92100:
    Your connection to the server was interrupted ... Details ...
    Java Exception:java.io.EOFException' error message when i make
    two calls to a c share object file using the ORA_FFI package.
    Forms will hang with that error message when I call the foreign
    function more than once and when the ORA_FFI.LOAD_LIBRARY
    function is executed twice.
    I've tried using the ORA_FFI.UNLOAD_LIBRARY function at the end
    straight after the load library plus my processes and it still
    hangs with that error message.
    I've got a temporary work around which is not ideal but it
    works. I've made another copy of the C shared object file and
    renamed it and made my second call to load this library.
    I would prefer to have one shared object file and make multiple
    calls to it from forms. Any suggestions?
    note : running forms 6.0 on three tier architecture with web
    browser.

    "Mush15" <[email protected]> wrote in
    message
    news:g7hela$flo$[email protected]..
    > Ok the issue is a stack overflow caused by calling the
    function
    > recursivly.
    >
    > I have tried creating 2 functions and have each call the
    other but still
    > recieve a stack overflow.
    >
    > Any ideas help??
    Try incrementing a counter every time you call the function
    and decrementing
    it on the way out. When you hit 2640 times, stop calling it.

  • Want to type special symble in Developer Text item

    Dear users
    i want to type some special symble in Oracle Devleoper text item i m using Developer 6i C/S..
    i want to type symble like this i have a text item char data type..
    &#8721; &#8730; &#8593;
    any have any idea how can i insert that symble my text item i get that symble from Microsft Office..
    thanks
    Rizwan

    Forms supports NLS_LANG=UTF8, so you could create Unicode application and there should not be problems with any symbols.
    Unfortunately, if you already have an application, there may be some parts of the code that may work with NLS_LANG=UTF8 incorectly, so you will have to rewrite them. For instance: system calls (DDE, OLE2, TEXT_IO package, HOST build-in), C code (ORA_FFI package, User Exits) etc...

  • WIN API

    The File Open dialog utility provided in WIN_API pll does not work on Win NT platform but it work on Windows 95.
    Error I am getting is "User Defined Exception" on Windows NT
    Any suggestions to make it work.
    Thanx

    Your question is rather vague - do you mean a particular API call or Windows APIs in general?
    If you need a particular call - check out the D2KWUTIL library that comes with the Forms Demos, this PLL and DLL provides a whole bunch of useful API calls such as reading and writing to the Registry.
    For more general integration, you can use the ORA_FFI package to make calls out to external C libraries such as the Windows System Libraries that make up the Windows API.

Maybe you are looking for

  • How do I run Disk Warrior on new MacBook Pros?

    I am trying to help my good friend who purchased a Late-2012 Macbook Pro 13-inch Core i5 2.5 GHz. It runs 10.8 ML. WIth reckless technical abandon, she swamped and corrupted her HD directory with repeated massive transfers of large-size photo files i

  • Any way to stop accidental deletion of events

    I find is puzzling that it is necessary to double click an event and then click the edit button in order to change any aspect of an event, but you can easily delete an event by simply having it hi-lighted and hitting the backspace key. We have a shar

  • Error while creating Org structure     Message no. BBP_LOCATION009

    Hi Iam trying to build an SRM6.0 with backend as R/3 4.7 I have replicated the plats from back end with report BBP_LOCATIONS_GET_FROM_SYSTEM On errors rectified the same and finally, SLG1 report shows no errors. But still noticed that T77S0 table ent

  • How do I combine (stack) my pdfs attached to my email?

    I use a system called docusign.  When my documents completed through docusign, it returns to me by email as pdf attachments.  How can i combine my pdfs?

  • Log in to server failed

    I have deleted all the old passwords and re-entered the new ones but it still it displaying that the log on to server XXX failed. Please help!