Article View: borland.public.jbuilder.java.language
Article #14506Re: loadLibrary
From: Kobus du Toit
Date: Fri, 27 Aug 1999 00:00
Date: Fri, 27 Aug 1999 00:00
40 lines
1345 bytes
1345 bytes
I saw that I need to use the jni.h file and probably others, but I don't
know how to use C header files in Delphi.
Kobus
Kobus du Toit wrote:
> I get a unsatisfied link error when I try to call procedures and
> functions in a dll
> I don't know what I am doing wrong.
>
> Kobus
>
> This is my java code
> native void Test();
> native int Min(int X, int Y);
>
> System.loadLibrary("Project1");
> int test = Min(1, 1);
>
> This is my Delphi code
> function Min(X, Y: Integer): Integer; stdcall;
> begin
> Result := 0;
> end;
>
> function Max(X, Y: Integer): Integer; stdcall;
> begin
> Result := 0;
> end;
>
> procedure Test;
> begin
> ShowMessage('Hi');
> end;
>
> exports
> Min index 1,
> Max index 2,
> Test index 3;
Technical Details
Message-ID:
<37C6782F.B4245650@iname.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<37C52B8F.54EC74F6@iname.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,dcc7b1ca6da47b38 X-Google-Attributes: gidf74b3,public From: Kobus du Toit <battlezone@iname.com> Subject: Re: loadLibrary Date: 1999/08/27 Message-ID: <37C6782F.B4245650@iname.com> X-Deja-AN: 517759219 Content-Transfer-Encoding: 7bit References: <37C52B8F.54EC74F6@iname.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Reply-To: battlezone@iname.com Newsgroups: borland.public.jbuilder.java.language