Partager via


IVsLibraryReferenceManager.AddComponentReference Method

Called by the project when adding a reference to a component identified by its path.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaration
Function AddComponentReference ( _
    wszPath As String, _
    pVsLibrary As Object _
) As Integer
int AddComponentReference(
    string wszPath,
    Object pVsLibrary
)
int AddComponentReference(
    [InAttribute] String^ wszPath, 
    [InAttribute] Object^ pVsLibrary
)
abstract AddComponentReference : 
        wszPath:string * 
        pVsLibrary:Object -> int
function AddComponentReference(
    wszPath : String, 
    pVsLibrary : Object
) : int

Parameters

  • wszPath
    Type: String

    [In] Reference to a component identified by its path.

  • pVsLibrary
    Type: Object

    [in] A pointer to an object of type pVsLibrary.

Return Value

Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsLibraryReferenceManager::AddComponentReference(
   [in] LPCOLESTR wszPath, 
   [in] IUnknown* pVsLibrary
);

.NET Framework Security

See Also

Reference

IVsLibraryReferenceManager Interface

Microsoft.VisualStudio.Shell.Interop Namespace