Jump to content
Excelsior Forums

rfrowd

Members
  • Content count

    0
  • Joined

  • Last visited

    Never

Community Reputation

0 Neutral

About rfrowd

  • Rank
    Newbie
  • Birthday 01/01/01
  1. I am trying to use xfunction to interface from Java to a C DLL in MS Windows. The function I am trying to call returns a pointer to a class. In C: typedef void *HPROB; #define SOLVAPI extern "C" __declspec(dllexport) SOLVAPI HPROB CoinCreateProblem(char *ProblemName); I need to return this HPROB pointer to pass to the next call to the dll. Can I just use a long variable type for this? In Java: xFunction create = new xFunction("CoinMP", "long CoinCreateProblem(CSTRING)"); Then to extract the return value: Argument arg1 = new Argument("CSS Problem", Argument.CSTRING); long hprob = (Long) create.invoke(arg1); Then to pass it to the next function in the dll call: args[0] = new Argument(hprob);
×