Jump to content
Excelsior Forums
Sign in to follow this  
MaiSofTXP

And now ...

Recommended Posts

... why my input structure like this

class inputS

{

  public int X;

  public int Y;

  public String s;

}

// C struct

// struct inputS {

// long X;

// long Y;

// unsigned char * s;

// }

with this code:

xFunction f = new xFunction("mydll","void myFunction(inputS*)")

// C function void myFunction(inputS*)

inputS inArg = new inputS();

inArg.X=1;

inArg.Y=2;

inArg.s="hello!";

Pointer arg= Pointer.createPointerTo((Structure)inArg);

f.invoke(arg);

resulting in:

inputS.X = 1  --> OK!

inputS.Y = 2  --> OK!

inputS.s = "%$?&" etc.  :huh:??:huh:??:huh:?

Share this post


Link to post
Share on other sites

resulting in:

inputS.X = 1? ?--> OK!

inputS.Y = 2? ?--> OK!

inputS.s = "%$?&" etc.? :huh:??:huh:??:huh:??

please clarify, when you get this results: in native code or in a java code after invoking of xFunction?

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  

×