对于BHO来说这两种注册有什么区别?

fool_leave 2004-09-07 09:28:42
要做一个嵌入IE的工具条,在注册文件中加入代码。我看到网上的例子和MSDN中的例子好像有些不同。
一个是
HKLM
{
NoRemove Software
{
NoRemove Microsoft
{
NoRemove 'Internet Explorer'
{
NoRemove Toolbar
{
val '{81FF6F20-5AC6-467B-BF7A-8C320F763AFD}' = b '00'
}
}
}
}
}

另一个是
HKLM {
SOFTWARE {
Microsoft {
Windows {
CurrentVersion {
Explorer {
'Browser Helper Objects' {
ForceRemove {1E1B2879-88FF-11D2-8D96-D7ACAC95951F}
}}}}}}}

应该用哪个?他们的区别是什么?
...全文
177 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
fool_leave 2004-09-08
  • 打赏
  • 举报
回复
不是呀.网上下的那个iefavoritemenu例子里用的就是第一个.

但MSDN中BHOs里的这段讲的是第二个
Registration of Helper Objects
A BHO is a COM server and should be registered both as a COM server and as a BHO. The ATL Wizard provides you with the necessary registrar script code (RGS) that accomplishes the first task. What follows is the RGS code that properly installs a helper object. (The CLSID comes from the example.)

HKLM {
SOFTWARE {
Microsoft {
Windows {
CurrentVersion {
Explorer {
'Browser Helper Objects' {
ForceRemove {1E1B2879-88FF-11D2-8D96-D7ACAC95951F}
}}}}}}}

Note the ForceRemove clause that causes the key to be removed when you unregister the object.

Under the Browser Helper Objects key fall all the installed helper objects. Such a list is never cached by the browser, so installing and testing BHOs is really a quick matter.

ACA 2004-09-08
  • 打赏
  • 举报
回复
不是按钮,是工具条
fool_leave 2004-09-08
  • 打赏
  • 举报
回复
但我通过第一种方式也实现了ie工具条呀。
firmbird 2004-09-08
  • 打赏
  • 举报
回复
BHO对象在浏览器打开的时候会被加载到进程内,前者只是在浏览器的工具条生成一个按钮,就象一个快捷方式一样用来启动相应的程序。
firmbird 2004-09-07
  • 打赏
  • 举报
回复
前者只是一个普通的工具条按钮插件,后者才是BHO

3,245

社区成员

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

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