Callback from DLL into Oracle forms

From: Ralph Potter <ralphp_at_woodwardassoc.co.uk>
Date: Wed, 7 Apr 2004 16:52:59 +0100
Message-ID: <0rVcc.28114$h44.3916550_at_stones.force9.net>



I develop a DLL that is used by our clients as a component within their systems.

We have a client who is trying to use our DLL within an Oracle forms application. They have succesfully used the ORA_FFI package to load the DLL and are able to make use of most of the functions exposed by the DLL as part of our API.

However, we have one published API function which takes a function pointer as a parameter. This function pointer is used by our DLL to request information from the host application (in this case from the Oracle forms application). In Delphi the definition for this function is something like this:

// Function pointer type declaration.
// This function should normally be implemented by the client to
respond to requests from our DLL.

    type PPCharFunc = function ( leventIn: integer; lmessageIn: PChar;

                              leventOut: PInteger; lmessageOut: PChar;
                              lmessageOutLength: Integer): Integer stdcall;
far;

// API function declaration.
// Registers the host callback with our DLL.
    function psCallbackFn ( fnptr: PPCharFunc ) : Integer; stdcall;

Is it possible to pass function pointers from P\L SQL into a DLL? If not, is there a commonly accepted mechanism for implementing callbacks from a DLL into Oracle forms applications?

Many thanks,

Ralph Potter Received on Wed Apr 07 2004 - 17:52:59 CEST

Original text of this message