Bagikan melalui


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)

Syntax

'Declaration
<GuidAttribute("17730D58-271F-11D7-8BF6-00B0D03DAA06")> _
Public Interface VCCodeIDLCoClass
'Usage
Dim instance As VCCodeIDLCoClass
[GuidAttribute("17730D58-271F-11D7-8BF6-00B0D03DAA06")]
public interface VCCodeIDLCoClass
[GuidAttribute(L"17730D58-271F-11D7-8BF6-00B0D03DAA06")]
public interface class VCCodeIDLCoClass
public interface VCCodeIDLCoClass

Remarks

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 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 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

See Also

Reference

VCCodeIDLCoClass Members

Microsoft.VisualStudio.VCCodeModel Namespace