Share via


VCLanguageManager Interface

An object used to validate various code elements of a C++ source file.

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

Syntax

'Declaration
<GuidAttribute("DF69B065-2447-11D7-8BF6-00B0D03DAA06")> _
Public Interface VCLanguageManager
'Usage
Dim instance As VCLanguageManager
[GuidAttribute("DF69B065-2447-11D7-8BF6-00B0D03DAA06")]
public interface VCLanguageManager
[GuidAttribute(L"DF69B065-2447-11D7-8BF6-00B0D03DAA06")]
public interface class VCLanguageManager
public interface VCLanguageManager

Remarks

The VCLanguageManager object allows validation of various code elements in a C++ source file, such as variable names, qualified names, C++ source file names, and so on.

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 validates the name of a possible C++ source file. This sample assumes that a file, MyFile.cpp, exists in the current solution directory.

Sub ValidateFileName()
    Dim vcCM as VCCodeModel
    vcCM = DTE.Solution.Item(1).CodeModel
    if(DTE.VCLanguageManager.ValidateFileName("MyFile.cpp")) Then
        DTE.Solution.Item(1).ProjectItems.AddFromFile("MyFile.cpp")
End Sub

See Also

Reference

VCLanguageManager Members

Microsoft.VisualStudio.VCCodeModel Namespace