Customizing Internet Explorer Download Manager

Source: Internet
Author: User

Implementing a Custom Download Manager
Implement a custom Download manager
The ability to implement a custom download manager is introduced in Microsoft Internet Explorer 5.5. This feature enables-extend the functionality of Windows Internet Explorer and WebBrowser applications by implement ing a Component object Model (COM) object to handle the file download process.
Starting with IE5.5, the custom download manager was introduced. This allows you to handle the download process by implementing a COM object
By implementing a custom download manager, your WebBrowser application can is extended to display a custom user interface. You are could, for example, create a download manager, this enables to view MPEG files or launch applications.
By implementing a custom download manager, your Webbrower application can be extended to display a custom user interface. For example, you can create a download manager to view MPEG images or launch applications
A download manager is implemented as a COM object that exposes the IUnknown and Idownloadmanager interface. Idownloadmanager have only one method, Idownloadmanager::D ownload, which are called by Internet Explorer or a WebBrowser app lication to download a file. When a file was selected for download in a WebBrowser application, the custom download Manager was accessed in one of the both WA Ys.
The download Manager is implemented as a COM object, exposing the IUnknown and Idownloadmanager interfaces. Idownloadmanager has only one method, Idownloadmanager::D ownload, the method is called when the Webbrower downloads a file. When a file is selected for download, a custom download manager is accessed with the following beam total method.
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.
If IServiceProvider::QueryService is implemented, Webbrower first calls IServiceProvider::QueryService to get the Idownloadmanager interface. The following example shows a possible implementation.
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 met Hod, or when using Internet Explorer itself for which IServiceProvider::QueryService cannot is implemented, the Applicatio n 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.
For IE6 and newer versions, if the Webbrower application does not implement IServiceProvider::QueryService, or if the user uses IE itself, its iserviceprovider::queryservice cannot be implemented, Webbrower Verify that the download management COM object exists in the registry. CLSID can be provided by either of the following methods
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.
If the application cannot navigate to the Download Manager, the default download will be used

Customizing Internet Explorer Download Manager

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.