在本地将HTML文件拖入IE中调用成功正确显示结果
file:///E:/www/atlcom.html
但在http服务器下调用就失败
http://127.0.0.1/atlcom.html 返回创建错误
调用VBscript脚本如下:
Sub TestDispSimple()
On Error Resume Next
set aaaa=CreateObject("ATLCom.myComponent")
if err<>0 then
MsgBox("创建错误")
else
j=aaaa.GetPort
MsgBox(j)
end if
end sub
file:///E:/www/atlcom.html
但在http服务器下调用就失败
http://127.0.0.1/atlcom.html 返回创建错误
调用VBscript脚本如下:
Sub TestDispSimple()
On Error Resume Next
set aaaa=CreateObject("ATLCom.myComponent")
if err<>0 then
MsgBox("创建错误")
else
j=aaaa.GetPort
MsgBox(j)
end if
end sub
1。客户机已经安装了你的组件并且已经注册
2。客户机IE安全设置要允许使用ActiveX或COM组件。
解决方法是,注册一下2.你的控件不是脚本安全的
解决方法
a:设置一下安全选项,把脚本安全那个选项启用。
b:将控件改成脚本安全的(继承IObjectSafety)