Compartir a través de


VCCodeStruct Interface

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

Namespace:  Microsoft.VisualStudio.VCCodeModel
Assembly:  Microsoft.VisualStudio.VCCodeModel (in Microsoft.VisualStudio.VCCodeModel.dll)

Syntax

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

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

Remarks

The VCCodeStruct object is used to modify an existing function construct.

Nota

A large part of the functionality of this object is provided by the Visual StudioCodeStruct object. For more information, see CodeStruct 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 all structure code elements of the current solution and displays each name in a message box.

Sub GetAllStructs()
    Dim vcCM As VCCodeModel
    Dim vcStruct As VCCodeStruct
    vcCM = DTE.Solution.Item(1).CodeModel
    For Each vcStruct in vcCM.Structs
        MsgBox(vcStruct.DisplayName)
    Next
End Sub

See Also

Reference

VCCodeStruct Members

Microsoft.VisualStudio.VCCodeModel Namespace