Export (0) Print
Expand All

VCCodeInterface Interface 

An object representing either a standard .idl interface, a dispinterface code element, or a code element (modified by the __interface keyword) in the source code of a solution.

Namespace: Microsoft.VisualStudio.VCCodeModel
Assembly: Microsoft.VisualStudio.VCCodeModel (in microsoft.visualstudio.vccodemodel.dll)

[GuidAttribute("17730D48-271F-11D7-8BF6-00B0D03DAA06")] 
public interface VCCodeInterface
/** @attribute GuidAttribute("17730D48-271F-11D7-8BF6-00B0D03DAA06") */ 
public interface VCCodeInterface
GuidAttribute("17730D48-271F-11D7-8BF6-00B0D03DAA06") 
public interface VCCodeInterface

The VCCodeInterface object represents an interface code element. Primarily, the object is used to access or modify the elements of an existing interface.

NoteNote

A large part of the functionality of this object is provided by the Visual Studio CodeInterface object. For more information, see CodeInterface object.

See Samples for Code Model Extensibility for information on how to compile and run this sample.

This example retrieves the first VCCodeInterface object of the current solution and displays it in a message box. It assumes a project containing interfaces is open.

Sub GetFirstInterface()
    Dim vcCM As VCCodeModel
    Dim vcInterface As VCCodeInterface
    vcCM = DTE.Solution.Item(1).CodeModel
    vcInterface = vcCM.Interfaces.Item(1)
    MsgBox(vcInterface.DisplayName)
End Sub
Show:
© 2015 Microsoft