Interface AddIn
Representa um Adicionar-in listado na caixa de diálogo de Gerente de suplementos e fornece informações sobre um suplemento a outros objetos Adicionar-in.
Namespace: EnvDTE
Assembly: EnvDTE (em EnvDTE. dll)
Sintaxe
<GuidAttribute("53A87FA1-CE93-48BF-958B-C6DA793C5028")> _
Public Interface AddIn
Dim instance As AddIn
[GuidAttribute("53A87FA1-CE93-48BF-958B-C6DA793C5028")]
public interface AddIn
[GuidAttribute(L"53A87FA1-CE93-48BF-958B-C6DA793C5028")]
public interface class AddIn
public interface AddIn
Comentários
Um objeto AddIn fornece informações sobre um Adicionar-in para outros suplementos.Somente registrado Adicionar-ins são representados por um objeto AddIn.
Exemplos
Sub AddInExample()
' 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)
' Connect the add-in if it is not already connected
' and list its SatelliteDLLPath and Guid.
If addinobj.Connected = False Then
addinobj.Connected = True
End If
MsgBox("Satellite DLL Path: " & addinobj.SatelliteDllPath)
MsgBox("DLL GUID: " & addinobj.Guid)
' Activates a solution add-in so that it is available, then
...' deactivates it.
addinobj = DTE.Solution.AddIns.Add(addinobj.ProgID, addinobj.Description, addinobj.Name, False)
DTE.Solution.AddIns.Item(1).Remove()
End Sub