Need help on call COM method from VBScript.
I have developed a COM DLL under VC++ 6.0. The project is created by COM wizard.The interface's name is ISMA. Then I add a method to it.The code is
interface ISMA : IDispatch
{
[id(1), helpstring("method IFInitInterface")] HRESULT IFInitInterface(DWORD dwCodeProtocol, DWORD dwDriverProtocol, LPCTSTR pDriverParam);
};
STDMETHODIMP CSMA::IFInitInterface(DWORD dwCodeProtocol, DWORD dwDriverProtocol, LPCTSTR pDriverParam)
{
// TODO: Add your implementation code here
return m_impClass.Test();
return S_OK;
}
--------------------------
<%
set obj=Server.CreateObject("SMACOM.SMA.1")
%>
<HTML>
<%
i = obj.IFInitInterface(0,0,"1")
%>
</HTML>
The error is IFInitInterface is not a VBScript supported Automation type.
Error code is 800a01ca.
Thanks a lot.