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
声明
Function AddComponentReference ( _
    wszPath As String, _
    pVsLibrary As Object _
) As Integer
用法
Dim instance As IVsLibraryReferenceManager
Dim wszPath As String
Dim pVsLibrary As Object
Dim returnValue As Integer
returnValue = instance.AddComponentReference(wszPath, _
    pVsLibrary)
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: System.String
[In] Reference to a component identified by its path. 
- pVsLibrary
Type: System.Object
[in] A pointer to an object of type pVsLibrary. 
Return Value
Type: System.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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
 
See Also
Reference
IVsLibraryReferenceManager Interface