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);