Passing a parameter by reference to an ActiveX function

Discussion in 'Javascript' started by cn99, Dec 12, 2005.

  1. cn99

    cn99 Guest

    Hello,

    I have develop an ActiveX with Visual C++ 6


    And I will call functions on this ActiveX from a javascript.
    I know how to instantiate the activex object (with the balise <object>).

    But how can I do to call a function of my ActiveX and pass to this function
    some parameter by reference.


    Here is what I have :
    the function in the ActiveX :


    void test(long *t, long FAR* nb)
    {
    t = 3 ;
    }

    And here is what I try to call this function in javascript :

    var myT = 0;
    my_control.test(myT); // here is the problem that
    alert("T : " + myT);


    But I receive the value 0

    So how can I do to pass parameter by reference to a function of an ActiveX
    ???
    Is there anything to change in my function in the ActiveX ?


    Thanks a lot for your help
     
    cn99, Dec 12, 2005
    #1
    1. Advertising

  2. cn99

    cn99 Guest

    myScript is like this:var ret, nb = 0;
    ret = my_control.test(1, nb); // here is the problem
    alert("ret : "+ret+"\nnb : "+nb);

    "cn99" <> wrote in message news:dnip28$nm$99.com...
    > Hello,
    >
    > I have develop an ActiveX with Visual C++ 6
    >
    >
    > And I will call functions on this ActiveX from a javascript.
    > I know how to instantiate the activex object (with the balise <object>).
    >
    > But how can I do to call a function of my ActiveX and pass to this

    function
    > some parameter by reference.
    >
    >
    > Here is what I have :
    > the function in the ActiveX :
    >
    >
    > void test(long *t, long FAR* nb)
    > {
    > t = 3 ;
    > }
    >
    > And here is what I try to call this function in javascript :
    >
    > var myT = 0;
    > my_control.test(myT); // here is the problem that
    > alert("T : " + myT);
    >
    >
    > But I receive the value 0
    >
    > So how can I do to pass parameter by reference to a function of an ActiveX
    > ???
    > Is there anything to change in my function in the ActiveX ?
    >
    >
    > Thanks a lot for your help
    >
    >
     
    cn99, Dec 12, 2005
    #2
    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.
Similar Threads
  1. Newsgroup - Ann
    Replies:
    5
    Views:
    610
    John Carson
    Jul 30, 2003
  2. Chris
    Replies:
    4
    Views:
    357
    peter koch
    Feb 15, 2007
  3. Azdo
    Replies:
    2
    Views:
    435
  4. Mister B
    Replies:
    8
    Views:
    554
    Nick Keighley
    Aug 26, 2010
  5. AzamSharp
    Replies:
    2
    Views:
    181
Loading...

Share This Page