Partager via


IVsObjectList.GetList Method

Definition

Returns a child IVsObjectList for the specified category.

public:
 int GetList(System::UInt32 index, System::UInt32 ListType, System::UInt32 flags, cli::array <Microsoft::VisualStudio::Shell::Interop::VSOBSEARCHCRITERIA> ^ pobSrch, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsObjectList ^ % pplist);
public:
 int GetList(unsigned int index, unsigned int ListType, unsigned int flags, Platform::Array <Microsoft::VisualStudio::Shell::Interop::VSOBSEARCHCRITERIA> ^ pobSrch, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsObjectList ^ &  pplist);
int GetList(unsigned int index, unsigned int ListType, unsigned int flags, std::Array <Microsoft::VisualStudio::Shell::Interop::VSOBSEARCHCRITERIA> const & pobSrch, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsObjectList const & & pplist);
public int GetList (uint index, uint ListType, uint flags, Microsoft.VisualStudio.Shell.Interop.VSOBSEARCHCRITERIA[] pobSrch, out Microsoft.VisualStudio.Shell.Interop.IVsObjectList pplist);
abstract member GetList : uint32 * uint32 * uint32 * Microsoft.VisualStudio.Shell.Interop.VSOBSEARCHCRITERIA[] * IVsObjectList -> int
Public Function GetList (index As UInteger, ListType As UInteger, flags As UInteger, pobSrch As VSOBSEARCHCRITERIA(), ByRef pplist As IVsObjectList) As Integer

Parameters

index
UInt32

[in] Specifies the index of the list item of interest.

ListType
UInt32

[in] Specifies the type of list being requested. Values are taken from the _LIB_LISTTYPE enumeration.

flags
UInt32

[in] Specifies the flags that control the request for object list information. Values are taken from the _LIB_LISTFLAGS enumeration.

pobSrch
VSOBSEARCHCRITERIA[]

[in] Unused. Should be ignored.

pplist
IVsObjectList

[out] Pointer to the IVsObjectList interface of the returned child list.

Returns

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsObjectList::GetList(  
   [in] ULONG Index,  
   [in] LIB_LISTTYPE ListType,  
   [in] LIB_LISTFLAGS Flags,  
   [in] VSOBSEARCHCRITERIA *pobSrch,  
   [out] IVsObjectList **ppList  
);  

When the user expands a list node, the object manager asks the list what child lists it supports under that list item by calling GetCategoryField (index, LC_LISTTYPE). Then it calls IVsObjectList.GetList with each of the list types returned as supported.

Under an LLT_PHYSICALCONTAINERS list a library would typically support LLT_NAMESPACES, LLT_CLASSES, and LLT_MEMBERS lists. Under LLT_NAMESPACES list, support LLT_NAMESPACES (for nested namespaces), and LLT_MEMBERS. Under LLT_CLASSES list, support LLT_CLASSES (for nested classes), and LLT_MEMBERS lists. LLT_HIERARCHY lists can appear anywhere to provide auxiliary information nodes such as Bases and Interfaces nodes, a Derived Classes node, and so on.

When GetList is called, your library should create (or reuse existing) an IVsObjectList based on the specified category for the specified tool (as per the flags). Any TTO_SORTTEXT strings allocated for the items that are obtained by the object manager through subsequent calls to GetText must be kept valid until the list's final release.

Applies to