Solved

Passing arguments by reference from javascript to activex object

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this article you will learn how to create a free basic website on Bitbucket, a git service provider. Polymer creates dynamic HTML components, which allow more flexibility than static HTML. This tutorial uses Ubuntu Linux but can also be done on W…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

829 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