Export (0) Print
Expand All

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)

[GuidAttribute("DF69B065-2447-11D7-8BF6-00B0D03DAA06")] 
public interface VCLanguageManager
/** @attribute GuidAttribute("DF69B065-2447-11D7-8BF6-00B0D03DAA06") */ 
public interface VCLanguageManager
GuidAttribute("DF69B065-2447-11D7-8BF6-00B0D03DAA06") 
public interface VCLanguageManager

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 Samples for Code Model Extensibility for information on how to compile and run this sample.

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