Table of Contents
Motivation: WebBrowser control for MWF
One of the most widely use and arguably the most popular control in use in System.Windows.Forms, is the InternetExplorer ActiveX WebBrowser control. Its support in Managed.Windows.Forms is becoming rapidly recessionary to facilitate the bridging of many apps from SWF to MWF.
The natural cross platform alternative to Internet Explorer is the Mozilla project's Gecko engine. Thanks to the efforts of the Mozilla ActiveX control team, many of the features in Internet Explorer now have direct equivalents in the Mozilla embedding API. However the Mozilla ActiveX control is only meant to work on Windows because of the ActiveX dependencies.
This concludes that we must wrap those interfaces ourselves. Since .NET generates assembly wrappers for ActiveX components for all the communication to the ActiveX control without exposing that its ActiveX underneath, we can implement the wrapper interfaces at this level without having to implement all of ActiveX.
Architecture of the IE component stack
SHDocVw.dll
This COM dll is the core of the Internet Explorer automation api. It exposes the e embeddable activeX control, as well as all the automation of externally launch instances of IE.
mshtml.dll
This COM dll is the core of the Microsoft HTML DOM api.
BrowseUI.dll
This COM dll is the core of the Windowing Toolkit of IE. This feature is not necessary for what we are trying to striving for, however it is referenced in my documents on the subject.
References
Architecture:
http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/overview/Overview.asp
http://msdn2.microsoft.com/en-us/library/system.windows.forms.webbrowser(VS.80).aspx
http://msdn2.microsoft.com/en-us/library/system.windows.forms.webbrowserbase(VS.80).aspx
Implementation Overview
The WebBrowser implimentation is made up of several parts:
- libmozembed - The native wrapper that wraps Mozilla. Built to satisfy the requirements of the MWF control, it remains versatile enough to be reusable for other embedding projects that require a simple and static C based interface.
- Mono.Mozilla.dll - This managed code wrapper is the core interface between libmozembed and managed code. It's abstract to all implementations and windowing toolkits.
- Mono.Mozilla.WebBrowser.dll - A System.Windows.Forms/Managed.Windows.Forms control that embeds Mozilla and exposes the root features of libmozembed
- Mono.Mozilla.Widget.dll - A GTK# Widget that embeds Mozilla and exposes the root features of libmozembed
- Interop.SHDocVw.dll - the managed implementation of the COM wrapper generated by tlb2asm
- AxInterop.SHDocVw.dll - the managed implementation of the ActiveX System.Windows.Forms control generated by tlb2asm
- Interop.mshtml.dll - the managed implementation of the COM wrapper generated by tlb2asm
- System.Windows.Forms.WebBrowser* - part of System.Windows.Forms 2.0, provides a static wrapper, almost identical to the WebBrowser exposed by SHDocVw in 1.1.
- Microsoft.IE - Assembly provided in 2.0, similar to other interfaces provided by SHDocVw


