This documentation is archived and is not being maintained.

VCCodeFunction Object

Visual Studio .NET 2003

An object defining a function construct in a source file.

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


The VCCodeFunction object provides code model functionality to existing Visual C++ IDE solutions at the function level. Primarily, this object is used to access or modify an existing function construct.

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


Namespace: Microsoft.VisualStudio.VCCodeModel

File: vcpkg.dll


This example retrieves all functions in the solution and displays the name of each.

Sub GetFunctions()
    Dim vcCM as VCCodeModel
    Dim vcFunc as VCCodeFunction
    vcCM = DTE.Solution.Item(1).CodeModel
    For Each vcFunc in vcCM.Functions
End Sub

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

See Also

AddFunction Method [Variation 1] (General Extensibility) | VCCodeFunction Object Properties, Methods, and Events | Visual C++ Extensibility Object Model