Jump to content
Excelsior Forums

AnshulaBhat

Members
  • Content count

    0
  • Joined

  • Last visited

    Never

Community Reputation

0 Neutral

About AnshulaBhat

  • Rank
    Newbie
  • Birthday 01/01/01
  1. Hi, I have got a licensed copy of xFunction version 2.15 ... I wanted to know how to dereference a double pointer to a struct. Our C-Code has the following API - long Function(struct1* var1,unsigned char* var2, long var3,struct1** var4); struct1 is a structure defined in the C-Code as - struct struct1 { unsigned char* data; long datalen; int typeOfData; }; I have a corresponding Java Class for struct1. My xFunction wrapper looks something like... wrapper_Function ( Struct1_class objInput, String var2, long var3, ) { try { xFunction func = new xFunction(strSignerLibName, "long Function( com.structures.Struct1_class*, "+ "char*, long, com.structures.Struct1_class**)"); Argument[] args = new Argument[4]; args[0] = Pointer.createPointerTo(objInput); args[1] = Argument.create("char*", var2 ); args[2] = new Argument ( var3 ); Pointer pOut = Pointer.create(com.structures.Struct1_class**"); args[3] = pOut; int nRetVal = ((Integer)func .invoke(args)).intValue(); objOutputData = new Struct1_class(); objOutputData = (Struct1_class)((Pointer) pOut.deref()); -- I know the above line of code is not right.... WHAT DO I do here now ?? How do I Derefence the Output ? return nRetVal ; } catch (com.excelsior.xFunction.xFunctionException xf) { throw new xFunctionGenericException(xf); } } }
×