Jump to content
Excelsior Forums
Sign in to follow this  

Pointer to struct arrays ....

Recommended Posts

Someone can tell me how is the mapping for a stGeo** parameter where the c function is something like this

void myfunc(stGeo**);

and stGeo is

struct stGeo {

char[10] a;

char[20] b;


and the function returns a pointer to an array of stGeo :huh:

I try with something like this:

xFunction f=new xFunction("myDll","void _myfunc@28(stGeo*)");

stGeo[][] paramStGeo = new stGeo[][]{{new stGeo(), new stGeo()}};

Pointer arg = Argument.create("stGeo*");


stGeo[][] output = (stGeo[][])arg.createArray(new int[]{1,2};

and in output[0] I could have my output but it doesn't works

What is wrong :huh:

Share this post

Link to post
Share on other sites

I try also with:


xFunction f=new xFunction("geoengine", "int myfunc(OutputNorm**)");

Pointer arg= Pointer.create("OutputNorm**");


OutputNorm[][] outEff=(OutputNorm[][])((Pointer)arg).createArray(new int[]{1,22});


OutputNorm[] outEff=(OutputNorm[])((Pointer)arg).createArray(new int[]{22});


Pointer outEff=(Pointer)((Pointer)arg).deref();

OutputNorm[][] outEff2=(OutputNorm[][])((Pointer)outEff).createArray(new int[]{1,22});

but I obtain always all blank fields !!!!!!!

HELP ME PLEASE !!!!!!!!!

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
Sign in to follow this