|
-
July 13th, 2004, 01:53 AM
#1
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|