Condividi tramite


IVsLibrary2 Interface

Definition

Describes the library and is used by the Object Manager to access pertinent symbols.

public interface class IVsLibrary2
public interface class IVsLibrary2
__interface IVsLibrary2
[System.Runtime.InteropServices.ComConversionLoss]
[System.Runtime.InteropServices.Guid("EDD9F8A9-3FFE-4C4C-94F8-610B88E19160")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsLibrary2
[<System.Runtime.InteropServices.ComConversionLoss>]
[<System.Runtime.InteropServices.Guid("EDD9F8A9-3FFE-4C4C-94F8-610B88E19160")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsLibrary2 = interface
Public Interface IVsLibrary2
Attributes

Remarks

The smallest unit a library can browse is referred to as a Browse Container. A library typically browses one type of Browse Container. Each project type implements one, and possibly more, libraries to track its symbols, objects, and so on. The package's IVsLibraryMgr tracks these libraries.

Libraries may be project specific, or global. Global libraries provide information on browse containers that are not a part of any project, but are added by a user through the Add Reference dialog. For more details on libraries and their relationship to the object browser see Object Browser and Class View.

See illustrations of the implementation and/or calling of this interface in the sample My C Package.

Notes to Implementers

The IVsLibrary2 interface is implemented when you want to provide object browsing.


Managed code implementations should implement the IVsSimpleLibrary2 interface instead to avoid memory leaks.

Notes to Callers

This interface is passed to the RegisterLibrary(IVsLibrary2, UInt32) method in the IVsObjectManager2 interface. This interface can then be returned by a call to the FindLibrary(Guid, IVsLibrary2) method in the IVsObjectManager2 interface.

Methods

AddBrowseContainer(VSCOMPONENTSELECTORDATA[], UInt32, String[])

Adds a browse container to be browsed by the library.

CreateNavInfo(SYMBOL_DESCRIPTION_NODE[], UInt32, IVsNavInfo)

Reserved for future use.

GetBrowseContainersForHierarchy(IVsHierarchy, UInt32, VSBROWSECONTAINER[], UInt32[])

Returns an array of Browse Containers that correspond to the given IVsHierarchy.

GetGuid(IntPtr)

Returns a pointer to the GUID of the library.

GetLibFlags2(UInt32)

Returns flags associated with the library.

GetLibList(LIB_PERSISTTYPE, IVsLiteTreeList)

Returns the list of browse containers currently being browsed by the library as an IVsLiteTreeList interface.

GetList2(UInt32, UInt32, VSOBSEARCHCRITERIA2[], IVsObjectList2)

Returns the requested list of symbols as an IVsObjectList interface.

GetSeparatorString(IntPtr)

Returns the string used to separate symbols for this type of Browse Container.

GetSupportedCategoryFields2(Int32, UInt32)

Returns the category values supported by the library for a specified category.

LoadState(IStream, LIB_PERSISTTYPE)

Asks the library to load its persisted global Browse Containers.

RemoveBrowseContainer(UInt32, String)

Removes a Browse Container being browsed by the library.

SaveState(IStream, LIB_PERSISTTYPE)

Asks the library to save its persisted global Browse Containers.

UpdateCounter(UInt32)

Returns the current change counter for the library and is used to indicate that the library contents have changed.

Applies to