Article View: borland.public.jbuilder.java.language
Article #14469Re: Passing parameters to windows DLL
From: Steve Schafer (TeamB)
Date: Wed, 01 Sep 1999 00:00
Date: Wed, 01 Sep 1999 00:00
24 lines
1676 bytes
1676 bytes
On Wed, 1 Sep 1999 17:46:29 +0100, "Jon Bedworth" <jon.bedworth@sentineluk.com> wrote: >I get an 'UnsatisfiedLinkError' every time I try to call methods declared in >a (Delphi-created) DLL. The program can find the library but not the methods >within it, it seems. At one point the online documentation describes this as >..... >'There could not have been an easier way to make Java methods native'!! > >This has not been my experience! I have tried passing parameters (int and >String), thought that String might in fact be an object that will not be >understood by the dll, so ended up creating a method within the dll that >took no arguments and returned nothing! Are you using the proper naming convention for the functions exported from your DLL? Look at the "Resolving Native Method Names" section of the JNI spec for details. One of these days, if I ever get enough time (or someone offers me enough money :), I will write a program that reads a set of .class files and creates skeleton source code for a Delphi DLL with all of the native functions properly declared and stubbed out. -Steve
Technical Details
Message-ID:
<37e87868.50358196@90.0.0.40>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7qjl0l$cvu6@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,5ed3cb6b0544303e X-Google-Attributes: gidf74b3,public From: pandeng@telepath.com (Steve Schafer (TeamB)) Subject: Re: Passing parameters to windows DLL Date: 1999/09/01 Message-ID: <37e87868.50358196@90.0.0.40> X-Deja-AN: 519858711 Content-Transfer-Encoding: 7bit References: <7qjl0l$cvu6@forums.borland.com> Content-Type: text/plain; charset=us-ascii Organization: TeamB Mime-Version: 1.0 Reply-To: pandeng@telepath.com Newsgroups: borland.public.jbuilder.java.language