Bagikan melalui


VCCodeIDLImportLib Interface

An object defining an importlib element in an .idl file.

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

Syntax

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

Remarks

The VCCodeIDLImportLib object represents an importlib code element from the .idl file of the parent solution. Primarily, the object is used to access the elements of an existing importlib 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 importlib code statement and displays it in a message box.

Sub GetFirstIDLImportLib()
    Dim vcCM As VCCodeModel
    Dim vcIDLImportLib As VCCodeIDLImportLib
    vcCM = DTE.Solution.Item(1).CodeModel
    vcIDLImportLib = vcCM.IDLLibraries.Item(1).IDLImportLibs.Item(1)
    MsgBox(vcIDLImportLib.DisplayName)
End Sub

See Also

Reference

VCCodeIDLImportLib Members

Microsoft.VisualStudio.VCCodeModel Namespace