This documentation is archived and is not being maintained.

VCCodeIDLCoClass Object

Visual Studio .NET 2003

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

[Visual Basic .NET]
Public Interface VCCodeIDLCoClass
   Inherits IDispatch
[Visual Basic 6]
Class VCCodeIDLCoClass
[C++]
interface VCCodeIDLCoClass : IDispatch
[C#]
public interface VCCodeIDLCoClass : IDispatch
[JScript .NET]
public interface VCCodeIDLCoClass extends IDispatch

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.

Requirements

Namespace: Microsoft.VisualStudio.VCCodeModel

File: vcpkg.dll

Example

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

See Also

VCCodeIDLCoClass Object Properties, Methods, and Events | Visual C++ Extensibility Object Model

Show: