Re: Call a DLL in Web Forms 6.0

From: Wayne Nappari <wnappari_at_bellatlantic.net>
Date: Fri, 06 Oct 2000 00:08:17 GMT
Message-ID: <RJ8D5.7673$uO1.447326_at_typhoon1.ba-dsg.net>


It is possible. I've just successfully completed doing something like this (but I was the one who wrote the DLL too). Here's what I ended up having to do:

  1. I had to write and compile a Java Bean that incorporated a Java Native Interface (JNI) function (the call to the procedure in the DLL).
  2. I used "javah" to generate a C header file for the function in the DLL. I then fleshed wrote the DLL using the function definition provided by "javah" and compiled it. If you weren't writing your own DLL, you might end up having to write your own DLL anyway as a wrapper so that Java can invoke your DLL and then you can call the other DLL from your DLL. (Since Java appears to want to dictate the interface to the functions in the DLL.)
  3. Add a Java Bean object to your Form. In the "Implementation Class" property, specify the name of your Java Bean. If you have a button or other object on the Form that invokes it. You can communicate back and forth using SET CUSTOM ITEM PROPERTY and custom events. There's a white paper on the Oracle site dictating the specifics of communication between your Form and the Java Bean.
  4. Beware the Java applet security monster. If you're trying to load a DLL from a local hard drive using a Form running in a browser, you'll run afoul of this. The only way I figured out how to beat this monster into submission was to unpack the f60web.jar file, add my classes to the mix and repack it and then digitally sign the resulting jar file using javakey.

Hope this helps.

Wayne Nappari
Email: wnappari_at_bellatlantic.net

"Karsten Weikop" <crashpilot_at_get2net.dk> wrote in message news:_bEz5.63$Nb6.2268_at_news.get2net.dk...
> Hi
>
> I need to call a DLL from within a Forms using WebForms. My problem is,
> ORA_FFI is not allowed in Webforms.
>
> According to Oracle Technical Support it is not possible but I have heard
> that it should be possible with Jave Beans !!
>
> Any good ideas?
>
> Karsten Weikop
> Email: crashpilot_at_get2net.dk
>
>
Received on Fri Oct 06 2000 - 02:08:17 CEST

Original text of this message