Article View: borland.public.jbuilder.java.language
Article #18619Using JNI with javai.dll instead of javai.lib
From: Robert Jochemsen
Date: Sun, 10 May 1998 00:00
Date: Sun, 10 May 1998 00:00
27 lines
1358 bytes
1358 bytes
Hi, Since I cannot link the javai.lib (or bccjavai.lib from Borland) from Delphi (bad file format), I want to use the javai.dll counterpart of it. I can transfer primitive values from the VM to my library without problem (don't need the javai.dll for that), but for strings I need translation functions from the virtual machine. The parameters for strings (and other objects) seem to be handles as expected, but calling a function like int l=javaStringLength(stringHandle); or int l=javaStringLength(env,stringHandle) ; in javai.dll directly does not work (=crash). I'm using the stdcall calling convention. I think I should somehow use the env pointer I get, but I can't figure it out how. The solution might be in the source of javai.lib, but unfortunately I don't have that. Thanks, Robert Jochemsen
Technical Details
Message-ID:
<3555F414.7CD4AD3@yahoo.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,145e2219a58e25ac,start X-Google-Attributes: gidf74b3,public From: Robert Jochemsen <RobertJochemsen@yahoo.com> Subject: Using JNI with javai.dll instead of javai.lib Date: 1998/05/10 Message-ID: <3555F414.7CD4AD3@yahoo.com> X-Deja-AN: 351999292 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language