Help2 Interface
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Help2 Interface

The interface that supports Document Explorer.

Namespace: Microsoft.VisualStudio.VSHelp80
Assembly: Microsoft.VisualStudio.VSHelp80 (in microsoft.visualstudio.vshelp80.dll)

[GuidAttribute("78413D2D-0492-4A9B-AB25-730633679977")] 
public interface Help2 : Help
/** @attribute GuidAttribute("78413D2D-0492-4A9B-AB25-730633679977") */ 
public interface Help2 extends Help
GuidAttribute("78413D2D-0492-4A9B-AB25-730633679977") 
public interface Help2 extends Help

Help2 supports How Do I, Search, and Favorites. It is the main entry point for accessing Document Explorer (Dexplorer.exe).

How you obtain the Help2 object depends on the application.

In non-VSPackages:

  • The Help2 object is a child of DTE in its object hierarchy and can be accessed by using the late-bound DTE.Help property. To access Help2 in an application that is not an add-in or a macro, you must obtain an instance of DTE, which is illustrated by the following example:

    EnvDTE.DTE dte;
    dte = (EnvDTE.DTE)System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.8.0");
    Object helpobj  = dte.Help;
    
  • In an add-in you can obtain the Help2 object directly:

    Microsoft.VisualStudio.VSHelp80.Help2 help2 = 
    (Microsoft.VisualStudio.VSHelp80.Help2)dte.GetObject("Help2");
    

In a VSPackage:

  • You obtain the Help2 object through SVsHelp service:

    Microsoft.VisualStudio.VSHelp80.Help2 help2;
    // Obtain the Help2 object from SVsHelp service.
    help2 = 
    (Microsoft.VisualStudio.VSHelp80.Help2)
    
this.GetService(typeof(Microsoft.VisualStudio.VSHelp.SVsHelp));
Show:
© 2016 Microsoft