Learn more about the IE8 Beta...
Add-ons Tweaks Web Development Add-on Development Troubleshooting Contact 

Extensions in Windows Internet Explorer Protected Mode

The Windows Vista version of IE7 includes a new feature called Protected Mode that helps protect the system against compromise even if malicious content is loaded by IE.  There are important considerations when developing add-ons that work correctly in Protected Mode Internet Explorer.

Learn more here:

Resources for Writing Extensions

http://blogs.msdn.com/ie/archive/2005/09/06/461675.aspx

IE provides a number of mechanisms that permit software developers to extend the browser in powerful ways.  You can write:
  1. Toolbar buttons
  2. Tools menu items
  3. Context menu items
  4. Toolbars
  5. Download managers
  6. Pluggable transfer protocols

An overview of many extensibility points is here: http://msdn2.microsoft.com/en-us/library/aa753587.aspx

The IE Developer Center was recently updated, and includes an Add-on Forum.

NEW (11/06) - A new step-by-step tutorial for building Browser Helper Objects has been posted to MSDN.

NEW (12/06) - A cool data-URI (RFC2397) pluggable protocol with source is available from CodeProject.

Sample Toolbar: Find as you type

Find as you type - A toolbar for IE that enables the "Find as you type."  Includes an x64 version, and source is available.

Sample BHO: Mouse Gestures

This is a great example of writing a BHO using ATL & C++.

http://www.codeproject.com/atl/mousegestures.asp

Note, to resolve references to atlapp.cpp, you'll need to install WTL and add WTL\Include to your Additional Includes directory in the C++ | General section of Project Properties.

Sample Pluggable Protocol in C#

Pluggable protocols allow you to return data to the browser from code, similar to how the HTTP protocol returns data to the browser from a remote server.

The AspxProtocol sample shows how to write a pluggable protocol in C#.  It's a very cool example, and very easy to customize to your particular needs.

Creating a context menu item that launches a program with the selected text

At the command prompt, run:

REG ADD "HKCU\Software\Microsoft\Internet Explorer\MenuExt\MENUITEMNAME" /ve /d "file://C:\Program Files\EXTENDIE\MENUITEMSCRIPT.htm"
REG ADD "HKCU\Software\Microsoft\Internet Explorer\MenuExt\MENUITEMNAME" /v "Contexts" /t REG_DWORD /d 16


Save the following as C:\Program Files\ExtendIE\MenuItemScript.htm

<SCRIPT LANGUAGE="JavaScript">
var parentwin = external.menuArguments; var doc = parentwin.document;
var sel = doc.selection; var rng = sel.createRange(); var str = new String(rng.text);
var oShell = new ActiveXObject("Shell.Application");
// Replace with your executable name
oShell.ShellExecute("cmd", "/k @echo " + str);
oShell = null;
</SCRIPT>

Tips

MSDN on Adding Context Menus
Launching programs from Script
Scriptable Shell Objects

Working with the Windows RSS Platform

There are many great resources for learning to use the Windows RSS Platform.  See http://blogs.msdn.com/rssteam for more info.

Iterating over the entire list of feeds, including sub folders (courtesy of Walter VonKoch, IE PM):

        // Requires C# 2.0
        public
System.Collections.Generic.IEnumerable<Feed> AllFeeds

        {

            get

            {

                System.Collections.Generic.Queue<IFeedFolder> queue = new System.Collections.Generic.Queue<IFeedFolder>();

                queue.Enqueue((IFeedFolder)fmgr.RootFolder);

                while (queue.Count > 0)

                {

                    IFeedFolder folder = queue.Dequeue();

                    foreach (IFeedFolder subfolder in (IFeedsEnum)folder.Subfolders)

                        queue.Enqueue(subfolder);

 

                    foreach (IFeed feed in (IFeedsEnum)folder.Feeds)

                        yield return new Feed(feed);

                }

            }

        }

 

 

It assumes that

 

            IFeedsManager fmgr = new global::Microsoft.Feeds.Interop.FeedsManager();

Troubleshoot Privilege Issues with .NET controls running in IE

HOW TO: Use the IEHost Log to Debug .NET Object Hosting in Internet Explorer

See also:
  http://blogs.msdn.com/shawnfa/archive/2003/06/26/57026.aspx
  http://dotnet.org.za/codingsanity/archive/2006/04/20/51710.aspx

Other good samples

BugList

See Internet Explorer Bugs for some known issues with IE7.

News

Get the latest news on the IE Team blog, the Windows Networking blog, and the MSDN IE Add-on Forum.