xFunction

Discussion in 'Java' started by garyh@cossdev.com, Oct 18, 2005.

  1. Guest

    Will xFunction work in an internet multiuser load balanced windows
    server environment?
     
    , Oct 18, 2005
    #1
    1. Advertising

  2. Roedy Green Guest

    On 18 Oct 2005 11:00:46 -0700, wrote or quoted :

    >Will xFunction work in an internet multiuser load balanced windows
    >server environment?


    I presume you mean xFunction under Jet.

    try http://www.excelsior-usa.com/jetsupport.html

    I can't see any reason it would not work.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
     
    Roedy Green, Oct 18, 2005
    #2
    1. Advertising

  3. Ya_Rab

    Joined:
    Nov 13, 2006
    Messages:
    1
    A problem with XFunction

    I wrote the following program in C++ 6.0:-

    #include <stdio.h>

    typedef struct{
    int arr[8];
    } MY_STRUCT;

    __declspec(dllexport) void display_values(MY_STRUCT *my){

    int i;

    for(i=0;i<8;i++){
    int val= my->arr;
    printf("%d ", val);
    printf("\n");
    }
    }

    And I saved this code in a .c file and the project was built successfully and I put the resulting DLL in system32 folder.

    Then I made a program in NetBeans 5.0 as follows:-

    import com.excelsior.xFunction.*;
    public class Main {

    public Main() {
    }
    public static void main(String[] args) throws xFunctionException{
    xFunction f=new xFunction("mydll","void display_values(int *)");
    int[] arr={1,2,3,4,5,6,7,8};
    MY_STRUCT my = new MY_STRUCT();
    my.arr=arr;
    Pointer arg = Pointer.createPointerTo(my);
    f.invoke(arg);
    System.out.println("\nOK");
    }

    }
    class MY_STRUCT extends Structure{

    int[] arr;

    public String defineLayout(){
    return "int[8] arr";
    }

    public MY_STRUCT(){
    arr = new int[8];
    }
    }
    then there was an error says:-

    com.excelsior.xFunction.IllegalSignatureException: Class 'MY_STRUCT' not found

    at com.excelsior.xFunction.ArgType.<init>(ArgType.java:169)

    at com.excelsior.xFunction.ArgType.getArgType(ArgType.java:110)

    at com.excelsior.xFunction.xFunction.parseSignature(xFunction.java:222)

    at com.excelsior.xFunction.xFunction.<init>(xFunction.java:41)

    So please some one help me.
     
    Ya_Rab, Nov 13, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page