VCCodeInclude Object

VCCodeInclude Object

Visual Studio .NET 2003

An object representing a #include code element in the source code of a solution.

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

Remarks

The VCCodeInclude object represents a #include code statement in a source file, allowing access to information about the specific code element.

Requirements

Namespace: Microsoft.VisualStudio.VCCodeModel

File: vcpkg.dll

Example

This example retrieves all #include code elements of the current solution and displays their content in a message box.

Sub GetAllIncludes()
    Dim vcCM As VCCodeModel
    Dim vcInclude As VCCodeInclude
    vcCM = DTE.Solution.Item(1).CodeModel
    For Each vcInclude in vcCM.Includes
        MsgBox(vcInclude.DisplayName)
    Next
End Sub

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

See Also

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

Show:
© 2016 Microsoft