Condividi tramite


VCCodeFunction Interface

An object defining a function construct in a source file.

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

Syntax

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

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

Remarks

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.

Nota

A large part of the functionality of this object is provided by the Visual Studio CodeFunction object. For more information, see CodeFunction 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 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
        MsgBox(vcFunc.DisplayName)
End Sub

See Also

Reference

VCCodeFunction Members

Microsoft.VisualStudio.VCCodeModel Namespace