Hi,
I have an VB application that calls MTS methods (written with VC++).
Now I have to migrate the clients from VB to HTML, but the calls to the MTS components don't work, the out parameters always return indefined.
An practical example:
VC++ method:
JavaScript call to MTS method:
The alert result is always: undefined
Why?
How can I get the Name parameter correctly?
regards,
Bruno Loureiro
<brunoloureiro@usa.net>
I have an VB application that calls MTS methods (written with VC++).
Now I have to migrate the clients from VB to HTML, but the calls to the MTS components don't work, the out parameters always return indefined.
An practical example:
VC++ method:
Code:
HRESULT getName(/*[in]*/long cust_id, /*[out]*/BSTR *Name,/*[out]*/BSTR *msgErr, /*[out, retval]*/long res);
Code:
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--
function xpto()
{
var cust_id = 1000;
var Name = String("");
var msgErro = String("");
var obj = new ActiveXObject("MyMTSComponent.MyClass");
var Res = obj.getName(cust_id, Name, msgErro);
alert(Name);
}
//-->
</SCRIPT>
The alert result is always: undefined
Why?
How can I get the Name parameter correctly?
regards,
Bruno Loureiro
<brunoloureiro@usa.net>