Solved

Passing arguments by reference from javascript to activex object

Posted on 2008-06-24
2
1,886 Views
Last Modified: 2013-11-18
I have created a COM object and call it as activex from a web page in javascript.
Is there a way to pass parameters by reference that will be occupied by the ActiveX object.
The only way I can get a value is:  as a - "[retval, out]"  --> means return value
My COM function signature: HRESULT GetProperties(                                    [in, out] BSTR pIn,                                    [out] ULONG* pOut1,                                    [out] ULONG* pOut2,                        
                                           [out,retval] BSTR* pOutRetVal);
pOut1 and pOut2 returns allways as 0 to the javascript.
My Javascript call:
var in, out1, out2, retVal;
var obj = new activexobject("AXname");
retVal = obj.GetProperties(in, out1, out2);
0
Comment
Question by:Optibase1
2 Comments
 
LVL 82

Accepted Solution

by:
hielo earned 500 total points
ID: 21855284
You will NOT be able to do that with javascript. However, vbscript supports pass by reference. Since you are dealing with ActiveX objects, I'm assuming you are dealing exclusively with IE. If so, try using vbscript.
0
 

Author Closing Comment

by:Optibase1
ID: 31470111
Thanks,
I guess your answer is 100% accurate
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
This article discusses how to create an extensible mechanism for linked drop downs.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now