Article View: borland.public.jbuilder.java.language
Article #18645Re: Help! Problem calling Crystal report engine
From: Cb
Date: Wed, 13 May 1998 00:00
Date: Wed, 13 May 1998 00:00
40 lines
1807 bytes
1807 bytes
It will not work as Java calls a DLL function in a particular naming
fashion. You need to create a new DLL with functions named in a way which
can be recognized by Java. This is what I plan to do but cannot get it
done: I cannot get my new DLL to call Crystal Report DLLs at compile time
because there are so many duplicated defines.
Cb
Rex wrote in message <6iap0u$hf74@forums.borland.com>...
>I've been trying to run Crystal reports using the Crystal's report engine
>using native calls.
>I get an 'Unsatisfied link error:' when I try to invoke native methods.
>I've tested the calls using the Powerbuilder and they worked.
>
>The class I wrote looks like this:
>
>package mypackage;
>import java.lang.*;
>class CrystalPrintClass {
> //Declare native methods
> public native boolean PEOpenEngine();
> public native boolean PECloseEngine();
> //etc.
> static{
> //Load the DLL
> System.loadLibrary("CRPE32");
> }
>}
>
>I used the following code from the application to access the DLL:
>
> //some other code
> CrystalPrintClass crystal;
> crystal = new CrystalPrintClass(); //Success
> breturnvalue = crystal.PEOpenEngine(); //This fails - I get an
>'Unsatisfied link error: PEOpenEngine
>
>
>
>
Technical Details
Message-ID:
<6jc67b$caa15@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6iap0u$hf74@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,106b40dbaf48218a X-Google-Attributes: gidf74b3,public From: "Cb" <chens888@cyberway.com.sg> Subject: Re: Help! Problem calling Crystal report engine Date: 1998/05/13 Message-ID: <6jc67b$caa15@forums.borland.com> X-Deja-AN: 352870526 References: <6iap0u$hf74@forums.borland.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.language