Freigeben über


AddIns-Schnittstelle

Aktualisiert: November 2007

Enthält alle im Dialogfeld Add-In-Manager aufgelisteten Add-Ins, sofern es sich um DTE.AddIns handelt, bzw. alle von einer bestimmten Projektmappe geladenen Add-Ins, sofern es sich um ProjectSolution.AddIns handelt.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Syntax

<GuidAttribute("50590801-D13E-4404-80C2-5CA30A4D0EE8")> _
Public Interface AddIns _
    Implements IEnumerable

Dim instance As AddIns
[GuidAttribute("50590801-D13E-4404-80C2-5CA30A4D0EE8")]
public interface AddIns : IEnumerable
[GuidAttribute(L"50590801-D13E-4404-80C2-5CA30A4D0EE8")]
public interface class AddIns : IEnumerable
public interface AddIns extends IEnumerable

Hinweise

Ein AddIn-Objekt gibt Informationen über ein Add-In an andere Add-Ins weiter. Nur registrierte Add-Ins können von einem AddIn-Objekt dargestellt werden.

Die IDTExtensibility2-Schnittstelle enthält die OnAddInsUpdate-Methode, die bei Aktualisierung der AddIns-Auflistung ausgeführt wird, es sei denn, es handelt sich bei dem Add-In um ein Projektmappen-Add-In.

Beispiele

Sub AddInsExample()
   ' For this example to work correctly, there should be an add-in 
   ' available in the Visual Studio environment.
   ' Set object references.
   Dim addincoll As AddIns
   Dim addinobj As AddIn
   
   ' Register an add-in, check DTE add-in count before and after the 
   ' update.
   addincoll = DTE.AddIns
   MsgBox("AddIns collection parent name: " & addincoll.Parent.Name)
   MsgBox("Number of Add-ins: " & addincoll.Count)
   ' NOTE: Use regsvr32 for Visual C++, regasm for Visual Basic 
   ' and Visual C#. Also, the pathname used below is an example only.
   Shell("regasm F:\AddIns\RegExplore\Debug\regexplore.dll")
   addincoll.Update()
   MsgBox("Number of Add-ins: " & addincoll.Count)
   addinobj = addincoll.Item(1)
End Sub 

Siehe auch

Referenz

AddIns-Member

EnvDTE-Namespace