Export (0) Print
Expand All

IDocHostUIHandler2 interface

Extends IDocHostUIHandler with a method that facilitates Windows Internet Explorer registry changes.


The IDocHostUIHandler2 interface inherits from IDocHostUIHandler but does not have additional members.


On initialization, MSHTML calls QueryInterface on the host's client site, and requests an IDocHostUIHandler2 interface. If the interface is available, MSHTML calls IDocHostUIHandler2 methods during the lifetime of the MSHTML component.

By implementing this interface, MSHTML can communicate with the host about its user interface status. The host can use this interface to modify internal user interface elements, such as menus, context menus, and toolbars.

IDocHostUIHandler2::GetOverrideKeyPath provides an alternate mechanism to IDocHostUIHandler::GetOptionKeyPath for a WebBrowser Control host to make changes in the registry settings for the WebBrowser Control. By using IDocHostUIHandler2::GetOverrideKeyPath, your WebBrowser Control instance preserves the registry settings for the current user. Any registry changes located at the registry path that are specified by this method override those located in HKEY_CURRENT_USER/Software/Microsoft/Internet Explorer. Compare this to IDocHostUIHandler::GetOptionKeyPath, which causes a WebBrowser Control instance to default to its original settings before registry changes are applied from the registry path specified by the method.

Note  The version 5.5 WebBrowser Control does not query its host for IDocHostUIHandler2 (Knowledge Base Q272968). If you are hosting Mshtml.dll directly, MSHTML version 5.5 will query for IDocHostUIHandler2. The version 6 WebBrowser Control does query for IDocHostUIHandler2.


Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]









Community Additions

© 2014 Microsoft