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 to call a C structure-type function to get data back?

843829Jun 7 2003 — edited Jun 12 2003

Dear all,

I have the following structure definition in C code, and then defines a function in C called RESULTVIEW *newResultView (int nNodes);
typedef struct _RESULTVIEW {
    char name[33];
    FIELD *flds;
} RESULTVIEW ;

typedef struct _FIELD {
    int dimension[3];
    float *data;
} FIELD;


RESULTVIEW *newResultView (int nNodes);
Now my questions are:

1). how can I call newResultView() from Java to get RESULTVIEW structure?

2). how to access FIELD structure in Structure RESULTVIEW from Java side?

I want to read these data structure from Java for further processing.

Please help with some ideas and code fragment, example if any.

Many thanks for you all!

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 10 2003
Added on Jun 7 2003
10 comments
150 views