Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Passing a parameter by reference to an ActiveX function

Reply
Thread Tools

Passing a parameter by reference to an ActiveX function

 
 
cn99
Guest
Posts: n/a
 
      12-12-2005
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


 
Reply With Quote
 
 
 
 
cn99
Guest
Posts: n/a
 
      12-12-2005
myScript is like this:var ret, nb = 0;
ret = my_control.test(1, nb); // here is the problem
alert("ret : "+ret+"\nnb : "+nb);

"cn99" <(E-Mail Removed)> wrote in message news:dnip28$nm$(E-Mail Removed)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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing parameter to function not expecting parameter Mister B C Programming 8 08-26-2010 08:01 AM
How to pass a parameter for a function parameter in a function AzamSharp Javascript 2 07-05-2008 12:24 AM
Default parameter to function when passing by reference Chris C++ 4 02-15-2007 07:01 PM
ActiveX apologetic Larry Seltzer... "Sun paid for malicious ActiveX code, and Firefox is bad, bad bad baad. please use ActiveX, it's secure and nice!" (ok, the last part is irony on my part) fernando.cassia@gmail.com Java 0 04-16-2005 10:05 PM
write a function such that when ever i call this function in some other function .it should give me tha data type and value of calling function parameter komal C++ 6 01-25-2005 11:13 AM



Advertisments