Export (0) Print
Expand All

VCCodeImport Object

Visual Studio .NET 2003

An object representing a #import code element in the source code of a solution.

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

Remarks

The VCCodeImport object represents a #import code statement in a source file, allowing access to information about the specific code element.

Requirements

Namespace: Microsoft.VisualStudio.VCCodeModel

File: vcpkg.dll

Example

This example retrieves the first VCCodeImport object of the current solution and displays it in a message box. It assumes that a C++ project containing a #import statement is open.

Sub GetFirstImport()
    Dim vcCM As VCCodeModel
    Dim vcImport As VCCodeImport
    vcCM = DTE.Solution.Item(1).CodeModel
    vcImport = vcCM.Imports.Item(1)
    MsgBox(vcImport.DisplayName)
End Sub

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

See Also

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

Show:
© 2014 Microsoft