Passing a parameter by reference to an ActiveX function

C

cn99

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
 
C

cn99

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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top