🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #14774

GetByteArrayRegion in Java Native Interface header file

#14774
From: Marcel van den Dungen
Date: Fri, 30 Jul 1999 00:00
21 lines
1226 bytes
Hello,

I wrote a DLL with Borland C and used the Java Native Interface to call
the methods from within Java. One of the parameters in a function in the
DLL is a byte array. I use the function defined in the header file jni.h
to copy elements from a byte array (pointer) in C to the Java byte
array. However, I don't want to copy all the elements from the C array
to the Java array.

In jni.h is defined:
void (JNICALL *GetByteArrayRegion)
(JNIENV *env, jbyteArray array, jsize start, jsize len, jbyte *buf)

How exactly does this function work?
Can I use this function to copy some elements from the C array to the
Java array?
Should I call the release-function afterwards?

Thanks in advance.

Bas
Technical Details
Message-ID: <37A1B983.6728FC48@c-content.nl>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,5f16c44a987629c8,start
X-Google-Attributes: gidf74b3,public
From: Marcel van den Dungen <info@c-content.nl>
Subject: GetByteArrayRegion in Java Native Interface header file
Date: 1999/07/30
Message-ID: <37A1B983.6728FC48@c-content.nl>
X-Deja-AN: 506990735
Content-Transfer-Encoding: 7bit
Organization: C-CONTENT b.v.
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language