Solved

Passing arguments by reference from javascript to activex object

Posted on 2008-06-24
2
1,909 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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 will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

685 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