Export (0) Print
Expand All

IVsPackage Interface

Initializes a VSPackage in the environment and makes its services available to the environment.

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in microsoft.visualstudio.shell.interop.dll)

[InterfaceTypeAttribute(1)] 
[GuidAttribute("D4F3F4B1-E900-4E51-ADB3-D532348F83CB")] 
public interface IVsPackage
/** @attribute InterfaceTypeAttribute(1) */ 
/** @attribute GuidAttribute("D4F3F4B1-E900-4E51-ADB3-D532348F83CB") */ 
public interface IVsPackage
InterfaceTypeAttribute(1) 
GuidAttribute("D4F3F4B1-E900-4E51-ADB3-D532348F83CB") 
public interface IVsPackage

This is the mandatory interface to be implemented in any VSPackage and is used by the environment to call on the VSPackage for services they might provide. Most environment extensions start out by loading a VSPackage, which is sited to the environment. The calling VSPackage is handed a pointer to a service provider. See illustrations of the implementation and/or calling of this interface in the Samples provided by Visual Studio Integration Program (VSIP). The standard IVsPackage implementation of the above samples is in VsPkg.cpp found within the sample files for each sample. VsPkg.rgs, also found in the sample files for each sample, registers the respective VsPackages and their (possible) menus, commands, and editor or project factories.

Notes to Implementers Implement IVsPackage whenever you initialize a VSPackage.

Community Additions

ADD
Show:
© 2015 Microsoft