Jump to content
Excelsior Forums
JDGamache

mapping structure

Recommended Posts

hi all!

How would I map this structure as a class extending Structure in java ?

Here is my structure in C

/*

typedef struct _ft_device_list_info_node {

ULONG Flags;

ULONG Type;

ULONG ID;

DWORD LocId;

char SerialNumber[16];

char Description[64];

FT_HANDLE ftHandle;

} FT_DEVICE_LIST_INFO_NODE;

*/

what I tried ...

public class InfoNode extends Structure {

public InfoNode() {

}

long Flags;

long Type;

long ID;

long LocId;

String SerialNumber;

String Description;

long ftHandle;

public String defineLayout(){return "long Flags, long Type, long ID, long LocId, char[16] SerialNumber, char[64] Description, long ftHandle";}

}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×