Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How can I map size_t in JNA?

843829Jul 15 2009 — edited Jul 17 2009
Hi everibody.

I need to map the struct bellow:
//This is the original struct. I need to do the same, but using JNA
 struct fp_print_data {
    size_t length;
    unsigned char data[0];
    };
I tried to do the class bellow, but not worked well.
//This is what i did, but doesn't work.
public class JCLeitorBiometricoStructurePrintData extends Structure {
    public int length;
    public byte data;
}
How can I map the "size_t" C type using JNA?
And I need to be sure that the var "char data[0]" is correctly mapped, if it isn't.

Could someone help me?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 14 2009
Added on Jul 15 2009
5 comments
1,108 views