This documentation is archived and is not being maintained.

VCCodeStruct Object

Visual Studio .NET 2003

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

[Visual Basic .NET]
Public Interface VCCodeStruct
   Inherits IDispatch
[Visual Basic 6]
Class VCCodeStruct
interface VCCodeStruct : IDispatch
public interface VCCodeStruct : IDispatch
[JScript .NET]
public interface VCCodeStruct extends IDispatch


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

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


Namespace: Microsoft.VisualStudio.VCCodeModel

File: vcpkg.dll


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
End Sub

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

See Also

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