Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
VCCodeFunction Interface

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)

[GuidAttribute("17730D4C-271F-11D7-8BF6-00B0D03DAA06")] 
public interface VCCodeFunction
/** @attribute GuidAttribute("17730D4C-271F-11D7-8BF6-00B0D03DAA06") */ 
public interface VCCodeFunction
GuidAttribute("17730D4C-271F-11D7-8BF6-00B0D03DAA06") 
public interface VCCodeFunction

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.

NoteNote

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

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

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
Show:
© 2015 Microsoft