Article View: borland.public.jbuilder.java.language
Article #19643JNI Question
From: Tim Heier
Date: Wed, 07 Jan 1998 00:00
Date: Wed, 07 Jan 1998 00:00
24 lines
1163 bytes
1163 bytes
Hello - I am trying to use the JNI mechanism to allow Java to call some
existing Windows DLL functions. I see how the simple examples work by
passing basic data types such as integers and floats and arrays.
How can I pass a C structure in Java? The native function that I am trying
to call in one of my DLL's accepts a structure like this:
typedef struct {
WORD length;
BYTE type;
FILE* ptr;
WORD points;
DWORD numPoints;
char* name;
BYTE* specs;
void* buffer;
} PLIST;
In particular, how can I group the data items in Java. It seems that it
would have to be a Class on the Java side and a structure on the C side. Is
this possible? Or is this outside the scope of the JNI capabilities?
Tim.
Technical Details
Message-ID:
<6907to$55q23@forums.borland.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,122b5dedbb99052,start X-Google-Attributes: gidf74b3,public From: "Tim Heier" <tim@uagworld.com> Subject: JNI Question Date: 1998/01/07 Message-ID: <6907to$55q23@forums.borland.com> X-Deja-AN: 313643155 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Organization: None Newsgroups: borland.public.jbuilder.java.language