Jump to content
Excelsior Forums
Sign in to follow this  
MaiSofTXP

Help a newbie please ...

Recommended Posts

Hi!

I'm new about xFunction and I'm trying to invoke a function defined in this way:

int WINAPI NormExtEx2(long, LPGEOINPUT, STGEOOUTPUT **);

where

-LPGEOINPUT is a STGEOINPUT* and STGEOINPUT is a struct

-STGEOOUTPUT is a struct and the function returns an array STGEOOUTPUT[20]

xFunction tells me that argument 2 is incompaticle with this call:

Pointer arg1= Pointer.create("int*");

Pointer arg2= Pointer.createPointerTo((Structure)input);

Output[][] out = new Output[][]{{new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output()}};

Pointer arg3=(Pointer)Argument.create("OutputNorm**",out);

Pointer[] args = new Pointer[]{arg1,arg2,arg3};

int result=((Integer)(f.invoke(args))).intValue();

what was wrong ??

Thanks!

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  

×