Compartir a través de


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)

Syntax

<GuidAttribute("17730D48-271F-11D7-8BF6-00B0D03DAA06")> _
Public Interface VCCodeInterface

Dim instance As VCCodeInterface
[GuidAttribute("17730D48-271F-11D7-8BF6-00B0D03DAA06")]
public interface VCCodeInterface
[GuidAttribute(L"17730D48-271F-11D7-8BF6-00B0D03DAA06")]
public interface class VCCodeInterface
public interface VCCodeInterface

Remarks

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

Nota

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

See How to: Compile Example Code for Visual C++ Code Model Extensibility for information on how to compile and run this sample.

Examples

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

See Also

Reference

VCCodeInterface Members

Microsoft.VisualStudio.VCCodeModel Namespace