This documentation is archived and is not being maintained.

VCCodeInterface Object

Visual Studio .NET 2003

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.

[Visual Basic .NET]
Public Interface VCCodeInterface
   Inherits IDispatch
[Visual Basic 6]
Class VCCodeInterface
[C++]
interface VCCodeInterface : IDispatch
[C#]
public interface VCCodeInterface : IDispatch
[JScript .NET]
public interface VCCodeInterface extends IDispatch

Remarks

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

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

Requirements

Namespace: Microsoft.VisualStudio.VCCodeModel

File: vcpkg.dll

Example

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 Samples for Code Model Extensibility for information on how to compile and run this sample.

See Also

VCCodeInterface Object Properties, Methods, and Events | Visual C++ Extensibility Object Model

Show: