Share via


AddIn 인터페이스

추가 기능 관리자 대화 상자에 있는 추가 기능을 나타내고 추가 기능에 대한 정보를 다른 추가 기능 개체에 제공합니다.

네임스페이스:  EnvDTE
어셈블리:  EnvDTE(EnvDTE.dll)

구문

‘선언
<GuidAttribute("53A87FA1-CE93-48BF-958B-C6DA793C5028")> _
Public Interface AddIn
[GuidAttribute("53A87FA1-CE93-48BF-958B-C6DA793C5028")]
public interface AddIn
[GuidAttribute(L"53A87FA1-CE93-48BF-958B-C6DA793C5028")]
public interface class AddIn
[<GuidAttribute("53A87FA1-CE93-48BF-958B-C6DA793C5028")>]
type AddIn =  interface end
public interface AddIn

AddIn 형식에서는 다음과 같은 멤버를 노출합니다.

속성

  이름 설명
Public 속성 Collection 이 속성을 지원하는 AddIn 개체가 포함된 컬렉션을 반환합니다.
Public 속성 Connected 추가 기능이 로드된 후 연결되어 있는지 여부를 나타내는 값을 가져오거나 설정합니다.
Public 속성 Description AddIn 개체에 대한 설명을 나타내는 문자열을 가져오거나 설정합니다.
Public 속성 DTE 최상위 확장성 개체를 가져옵니다.
Public 속성 Guid AddIn 개체의 GUID를 가져옵니다.
Public 속성 Name AddIn 개체의 이름을 가져옵니다.
Public 속성 Object 지정된 AddIn 개체를 지원하는 개체를 가져오거나 설정합니다.
Public 속성 ProgID 추가 기능의 레지스트리 항목에 따라 ProgID를 가져옵니다.
Public 속성 SatelliteDllPath 지역화된 리소스가 포함된 DLL의 위치를 가져옵니다.

위쪽

메서드

  이름 설명
Public 메서드 Remove 추가 기능 컬렉션에서 추가 기능을 제거하여 사용할 수 없도록 합니다.

위쪽

설명

AddIn 개체는 특정 추가 기능에 대한 정보를 다른 추가 기능에 제공합니다. 또한 AddIn 개체는 등록된 추가 기능만 나타낼 수 있습니다.

예제

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 

참고 항목

참조

EnvDTE 네임스페이스