微软专家看过来

swordchueng 2002-05-10 05:44:36
Recently, I have wrote an Activex control. package it and implement for script and initialize safety.

the control who have a property named "msgstr",pass what's the control needs information to work. following code diaplay how i use it.

<HTML>
<HEAD>
<TITLE>scan.CAB</TITLE>
</HEAD>
<BODY>
<OBJECT ID="scan"
CLASSID="CLSID:C525B9F9-EE7A-4295-8E2B-3269B0AC8624"
CODEBASE="scan.CAB#version=1,0,0,2">
</OBJECT>

<script language = "vbscript">
'set the "msgstr" property
scan.msgstr = "10.128.0.7:1234567987"

</script>
</BODY>
</HTML>

open IE,there's an security alert display.both active after i click yes/no.

if there no script or do not set the "msgstr" property, the security alert disappear.but the control needs the "msgstr" property to do.

how can i figure out ?
...全文
107 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
swordchueng 2002-05-14
  • 打赏
  • 举报
回复
There are two ways to mark a control as safe for scripting and initialization:
Implement the IObjectSafety interface.

Provide the following registry keys for the control's CLSID under the Implemented Categories section:
The following key marks the control safe for scripting:
7DD95801-9882-11CF-9FA9-00AA006C42C4
The following key marks the control safe for initialization from persistent data:
7DD95802-9882-11CF-9FA9-00AA006C42C4
(MS Support)
现在我是通过第二种方法实现 scripting and initialization 安全。安全警告总是出现,但是无论你点“是”或者“否”,控件本身都是ACTIVE,而且出现安全警告的同时,控件已经显示出来。

其中用到了我的一个同事写的COM,没有实现scripting and initialization 安全。

各位帮忙想想可能是那里出了点问题 --
Areece 2002-05-11
  • 打赏
  • 举报
回复
在IE的安全选项里面有一个设置,你可以点击“自定义级别”就可以看到ActiveX和插件的安全设置里有“对标记为可安全执行脚本的....”,这里用户还可以选择是否需要提示。
哧哧,不是说组件开发者说它是安全的,最终的用户就会认为它是安全的。

3,245

社区成员

发帖
与我相关
我的任务
社区描述
ATL,Active Template Library活动(动态)模板库,是一种微软程序库,支持利用C++语言编写ASP代码以及其它ActiveX程序。
社区管理员
  • ATL/ActiveX/COM社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧