Originally posted by Frank Hale:
What I am looking for is how to get at C structures from Java code. I would like to build a JNI wrapper around an existing C Library
Originally posted by Frank Hale:
Next time I will be more clear.
Okay what I am doing is trying to create a binding to a C lib (Xlib - X Windows System). This is a huge library and very complex. I've figured out how to cast some pointers to jint and pass them back to java as a handle. I've created a few native wrapper functions around Xlib functions which then cast the jint back to the original type, struct, or whatever. I am having a problem with XEvent as its a union and when I try to cast it, it will not fit inside a jint or a jlong. If I try to pass a reference and then cast that back I crash the VM everytime.
I've probably went into to much detail. Can anyone help? I can post code if you like.
Another question if I was to create java objects for C structs how would I go about passing the data to the java object?
Frank
I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
Amit Zzz Kulkarni wrote:Frank,
This site is no good in sending notifications that this question was updated.
If he has waited 11 years for a notification of a reply, he is a very patient personJesus Angeles wrote:
Amit Zzz Kulkarni wrote:Frank,
This site is no good in sending notifications that this question was updated.
You can set things in your Profile, or click ~'Watch Topic' at the bottom.
You can set things in your Profile, or click ~'Watch Topic' at the bottom.