定制Internet Explorer下载管理器

Implementing a Custom Download Manager
实现一个定制的下载管理器
The ability to implement a custom download manager was introduced in Microsoft Internet Explorer 5.5. This feature enables you to extend the functionality of Windows Internet Explorer and WebBrowser applications by implementing a Component Object Model (COM) object to handle the file download process.
从IE5.5开始,定制下载管理器被引入。这允许你通过实现一个COM对象来处理下载过程
By implementing a custom download manager, your WebBrowser application can be extended to display a custom user interface. You could, for example, create a download manager that enables you to view MPEG files or launch applications.
通过实现一个定制的下载管理器,你的WebBrower应用程序可以被扩展,以显示一个定制的用户界面。比如,你可以创建你一个下载管理器来查看MPEG图片或者启动应用程序
A download manager is implemented as a COM object that exposes the IUnknown and IDownloadManager interface. IDownloadManager has only one method, IDownloadManager::Download, which is called by Internet Explorer or a WebBrowser application to download a file. When a file is selected for download in a WebBrowser application, the custom download manager is accessed in one of two ways.
下载管理器以com对象方式实现,暴露IUnknown和IDownloadManager接口。IDownloadManager只有一个方法,IDownloadManager::Download,该方法在WebBrower下载一个文件时候被调用。当一个文件被选中下载,定制的下载管理器用以下梁总方法被访问。
If the IServiceProvider::QueryService method of the IServiceProvider interface is implemented, the WebBrowser application first calls IServiceProvider::QueryService to retrieve an IDownloadManager interface pointer. The following example shows a possible implementation of the IServiceProvider::QueryService method.
如果IServiceProvider::QueryService被实现,WebBrower首先调用IServiceProvider::QueryService获取IDownloadManager接口。如下实例显示可能的实现。
STDMETHODIMP CServiceProvider::QueryService(REFGUID guidService,
                                            REFIID riid,
                                            void **ppv)
{
    HRESULT hr = E_NOINTERFACE;


    if (guidService == SID_SDownloadManager && riid == IID_IDownloadManager)
    {
        // Create new CDownloadMgr object using ATL.
        CComObject<CDownloadMgr>* pDownloadMgr;
        hr = CComObject<CDownloadMgr>::CreateInstance(&pDownloadMgr);
        
        // Query the new CDownloadMgr object for IDownloadManager interface.
        hr = pDownloadMgr->QueryInterface(IID_IDownloadManager, ppv);
    }


    return hr;
}
For Internet Explorer 6 and later, if the WebBrowser application does not implement the IServiceProvider::QueryService method, or when using Internet Explorer itself for which IServiceProvider::QueryService cannot be implemented, the application checks for the presence of a registry key containing the class identifier (CLSID) of the download manager COM object. The CLSID can be provided in either of the following registry values.
对于IE6及更新版本,如果WebBrower应用程序没有实现IServiceProvider::QueryService,或者当用户使用IE自身,其IServiceProvider::QueryService不能被实现,WebBrower核查下载管理COM对象是否在注册表中存在。CLSID可以通过下面两者之一方式提供
HKEY_LOCAL_MACHINE 
     Software
          Microsoft
               Internet Explorer
                    DownloadUI
HKEY_CURRENT_USER 
     Software
          Microsoft
               Internet Explorer
                    DownloadUI
If the application cannot locate a custom download manager the default download user interface is used.
如果应用程序不能定位到下载管理器,默认下载将被使用
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
源代码推荐——VB实现IE下载管理器扩展 ------ 摘要 这个例子演示了如何实现一个自定义IE下载管理器,当IE下载一个文件,VBWebDownloader.exe就会启动来下载它。 (这个项目支持断点续传,而且代码相对简单) 注意:一些第三方的IE下载扩展可能会和这个例子程序冲突,所以在尝试这个例子之前最好临时屏蔽它们。 安装/卸载 A. 安装 对于32bit系统,或者32bit IE运行在54bit系统,安装 VBIEDownloadManagerSetup(x86) 项目输出的VBIEDownloadManagerSetup(x86).msi。对于 64bit IE安装 VBIEDownloadManagerSetup(x64) 项目输出的 VBIEDownloadManagerSetup(x64).msi。 B. 卸载 运行安装时候所用的那个安装程序,并且选择卸载。 演示:(不翻译了,自己看吧) Step1. Open this project in VS2010 and set the platform of the solution to x86. Make sure that the projects VBIEDownloadManagerSetup, VBWebDownloader and VBIEDownloadManagerSetup(x86) are selected to build in Configuration Manager. NOTE: If you want to run this sample in 64bit IE, set the platform to x64 and select VBIEDownloadManagerSetup, VBWebDownloader and VBIEDownloadManagerSetup(x64) to build. Step2. 生成解决方案 Step3. Right click the project VBIEDownloadManagerSetup(x86) in Solution Explorer, and choose "Install". Step4. Open 32bit IE and visit the the download link of Microsoft .NET Framework 4 http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=0a391abd-25c1-4fc0-919f-b21f31ab88b7. Click the "Download" button on this page, and then VBWebDownloader.exe will be launched. In VBWebDownloader.exe, you will find that the url is http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe and the local path is D:\dotNetFx40_Full_x86_x64.exe Step5. Click the button "Download" in VBWebDownloader.exe, it will start to download the file, and after a few minutes, you will find a file D:\dotNetFx40_Full_x86_x64.exe in Windows Explorer. 下载: http://code.msdn.microsoft.com/VBIEDownloadManager-3287b087
### 回答1: Internet Explorer 8(IE 8)是由微软公司开发的网页浏览器,于2009年3月发布。该浏览器具有许多新功能和改进,包括更快的渲染速度、更安全的浏览体验和更好的网站兼容性。 IE 8的加速功能可以显著提高网页的加载速度。此外,它针对保护个人隐私、防止网络钓鱼和阻止不受欢迎的信息等方面的安全性进行了改进。它还引入了一个称为“兼容性视图”的新功能,该功能可以使各种网站在IE 8中更好地呈现。 尽管IE 8包含了许多重要的改进,但它仍然存在一些问题。例如,它可能会在支持标准的网站上显示出渲染问题,导致页面元素不正确地显示或位置不当。此外,IE 8不能在Windows XP以及更早版本的操作系统上运行,这可能会对某些用户造成限制。 总的来说,IE 8是一个重要的浏览器版本,虽然在现代互联网浏览中已有更好的选择,但对于某些老旧的系统和应用程序来说,它仍然是必不可少的。 ### 回答2: Internet Explorer 8(IE8)是微软开发的一款网络浏览器,于2009年发布。以下是关于IE8的介绍: 1. 安全性提升:IE8在安全性方面进行了重要的改进。它引入了SmartScreen无纸化技术,可以识别和阻止潜在的恶意软件和钓鱼网站,保护用户的计算机免受恶意攻击。 2. 加速浏览:IE8采用了加速浏览器的技术,使浏览器页面加载速度更快。这项技术称为“加速通过硬件图形加速API的绘图”,利用计算机的硬件加速渲染网页,提供更快的浏览体验。 3. 兼容性改进:IE8在兼容性方面也进行了改进,支持更多的Web标准,使用户能够更好地浏览和使用各种网站。IE8支持CSS 2.1、XHTML和SVG等标准,提供更优秀的网页浏览效果。 4. 新增功能:IE8具有一些实用的功能,如快速选项卡,可以为用户在同一窗口中打开多个网页,并提供了一个方便的标签管理器来管理这些选项卡。它还提供了一项称为“Web切片”的功能,可以定制网页的部分内容并将其添加到收藏夹栏中。 总之,IE8是一款注重安全性、速度和兼容性的网络浏览器。虽然现在已经有很多先进的浏览器,但IE8在当时是一款受欢迎的浏览器,并为用户提供了更好的上网体验。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

北京橙溪科技

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值