2 messages in net.java.dev.jna.users[jna-users] Mapping question PointerB...
FromSent OnAttachments
Hendrik SalyFeb 10, 2009 9:10 am 
Timothy WallFeb 10, 2009 11:13 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[jna-users] Mapping question PointerByReferenceActions...
From:Hendrik Saly (hend@gmx.de)
Date:Feb 10, 2009 9:10:24 am
List:net.java.dev.jna.users

Hello,

is it correct to map a C function

C: int create_instance(INST_INIT *init, FDESC *fdesc);

- where INST_INIT is a typedef struct ... and - where FDESC is a typedef void *

to Java using JNA in that way:

Java: int create_instance(INST_INIT init, FDESC fdesc);

- where INST_INIT is a class that extends Structure with some public members and - where FDESC is a class that extends PointerByReference

I have expecially with FDESC some strange behaviours. Is FDESC (its a kind of "instance handle") correct mapped?

Environment: Linux i386, JNA 3.0.5, Sun JDK 1.5, Native lib is a .so File

Thanks Hendrik