Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

pass out parameter to javascript

122 views
Skip to first unread message

Sue

unread,
Aug 4, 2011, 3:18:20 PM8/4/11
to
Hi,

I develop a simple activex component and calling its function from
javascript. But I'd like to have both the result and S_OK passing to
javascript. I tried the out parameter and it didn't work. How can I do
this?

STDMETHODIMP CTestCtrl::Add(LONG a, LONG b, LONG* result)
{
*result = a + b;

return S_OK;
}


var obNewAXComponent = new ActiveXObject("MyComSvr.TestCtrl");
var result = obNewAXComponent.Add(3, 1);

0 new messages