This documentation is archived and is not being maintained.

VCCodeIDLCoClass Interface 

An object defining a CoClass element in a .idl file.

Namespace: Microsoft.VisualStudio.VCCodeModel
Assembly: Microsoft.VisualStudio.VCCodeModel (in microsoft.visualstudio.vccodemodel.dll)

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

The VCCodeIDLCoClass object represents a CoClass code element from the .idl file of the parent solution. Primarily, this object is used to access the elements of an existing CoClass code element.

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

This example retrieves the first CoClass code statement and displays it in a message box.

Sub GetFirstCoClass()
    Dim vcCM As VCCodeModel
    Dim vcIDLCoClass As VCCodeIDLCoClass
    vcCM = DTE.Solution.Item(1).CodeModel
    vcIDLCoClass = vcCM.IDLLibraries.Item(1).IDLCoClasses.Item(1)
    MsgBox(vcIDLCoClass.DisplayName)
End Sub
Show: