Compartir a través de


IVsSimpleObjectList2.GetList2 Method

Returns a child IVsSimpleObjectList2 for the specified category.

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

Syntax

'Declaration
Function GetList2 ( _
    index As UInteger, _
    ListType As UInteger, _
    flags As UInteger, _
    pobSrch As VSOBSEARCHCRITERIA2(), _
    <OutAttribute> ByRef ppIVsSimpleObjectList2 As IVsSimpleObjectList2 _
) As Integer
int GetList2(
    uint index,
    uint ListType,
    uint flags,
    VSOBSEARCHCRITERIA2[] pobSrch,
    out IVsSimpleObjectList2 ppIVsSimpleObjectList2
)
int GetList2(
    [InAttribute] unsigned int index, 
    [InAttribute] unsigned int ListType, 
    [InAttribute] unsigned int flags, 
    [InAttribute] array<VSOBSEARCHCRITERIA2>^ pobSrch, 
    [OutAttribute] IVsSimpleObjectList2^% ppIVsSimpleObjectList2
)
abstract GetList2 : 
        index:uint32 * 
        ListType:uint32 * 
        flags:uint32 * 
        pobSrch:VSOBSEARCHCRITERIA2[] * 
        ppIVsSimpleObjectList2:IVsSimpleObjectList2 byref -> int
function GetList2(
    index : uint, 
    ListType : uint, 
    flags : uint, 
    pobSrch : VSOBSEARCHCRITERIA2[], 
    ppIVsSimpleObjectList2 : IVsSimpleObjectList2
) : int

Parameters

  • index
    Type: UInt32

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

  • ListType
    Type: UInt32

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

  • flags
    Type: UInt32

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

Return Value

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

Remarks

COM Signature

From vsshell80.idl:

HRESULT IVsSimpleObjectList2::GetList2(
   [in]          ULONG                  Index, 
   [in]          LIB_LISTTYPE2          ListType, 
   [in]          LIB_LISTFLAGS          Flags, 
   [in]          VSOBSEARCHCRITERIA2   *pobSrch, 
   [out, retval] IVsSimpleObjectList2 **ppIVsObjectList2
);

When the user expands a list node, the object manager asks the list what child lists it supports under that list item by calling the GetCategoryField2 method. Then the object manager calls the GetList2 method with each of the list types returned as supported.

Under an LC_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 GetList2 is called, your library should create an (or reuse an existing) IVsSimpleObjectList2 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.

.NET Framework Security

See Also

Reference

IVsSimpleObjectList2 Interface

Microsoft.VisualStudio.Shell.Interop Namespace