473,411 Members | 2,019 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

Passing a parameter by reference to an ActiveX function

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
Dec 12 '05 #1
2 6540
myScript is like this:var ret, nb = 0;
ret = my_control.test(1, nb); // here is the problem
alert("ret : "+ret+"\nnb : "+nb);

"cn99" <bz****@163.com> wrote in message news:dn*********@news.cn99.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

Dec 12 '05 #2
On 2005-12-12, cn99 <bz****@163.com> wrote:
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 ;
}
that seems kind of pointless. I understand C but how javascript interfaces
with ActiveX so all I can say is that it's wrong, not how it should look.
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 ?


change it so it does something.
--

Bye.
Jasen
Dec 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: domeceo | last post by:
can anyone tell me why I cannot pass values in a setTimeout function whenever I use this function it says "menu is undefined" after th alert. function imgOff(menu, num) { if (document.images) {...
39
by: Mike MacSween | last post by:
Just spent a happy 10 mins trying to understand a function I wrote sometime ago. Then remembered that arguments are passed by reference, by default. Does the fact that this slowed me down...
11
by: John Pass | last post by:
Hi, In the attached example, I do understand that the references are not changed if an array is passed by Val. What I do not understand is the result of line 99 (If one can find this by line...
6
by: ged | last post by:
Hi, i am a oo (c#) programmer, and have not used javascript for a while and i cant work out how javascript manages its references. Object References work for simple stuff, but once i have an...
12
by: Andrew Bullock | last post by:
Hi, I have two classes, A and B, B takes an A as an argument in its constructor: A a1 = new A(); B b = new B(a1);
7
by: TS | last post by:
I was under the assumption that if you pass an object as a param to a method and inside that method this object is changed, the object will stay changed when returned from the method because the...
12
by: dave_dp | last post by:
Hi, I have just started learning C++ language.. I've read much even tried to understand the way standard says but still can't get the grasp of that concept. When parameters are passed/returned...
4
by: Deckarep | last post by:
Hello fellow C# programmers, This question is more about general practice and convention so here goes: I got into a discussion with a co-worker who insisted that as a general practice all...
1
by: Mike H | last post by:
I can't seem to figure out the right thing to search on, so I thought I'd just provide an example and see if someone can point me to some tips. What I have is an Automation Server that has a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.