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)
Syntax
'Declaración
<GuidAttribute("D4F3F4B1-E900-4E51-ADB3-D532348F83CB")> _
<InterfaceTypeAttribute()> _
Public Interface IVsPackage
'Uso
Dim instance As IVsPackage
[GuidAttribute("D4F3F4B1-E900-4E51-ADB3-D532348F83CB")]
[InterfaceTypeAttribute()]
public interface IVsPackage
[GuidAttribute(L"D4F3F4B1-E900-4E51-ADB3-D532348F83CB")]
[InterfaceTypeAttribute()]
public interface class IVsPackage
public interface IVsPackage
Remarks
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.
If a package needs to block shutdown of the IDE it should implement IVsPackage2.