IVsObjectList.LocateNavigationInfo Method

Returns the index of the list item corresponding to the VSOBNAVIGATIONINFO2 structure.

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

Syntax

‘선언
Function LocateNavigationInfo ( _
    pobNav As VSOBNAVIGATIONINFO2(), _
    pobName As VSOBNAVNAMEINFONODE(), _
    fDontUpdate As Integer, _
    <OutAttribute> ByRef pfMatchedName As Integer, _
    <OutAttribute> pIndex As UInteger() _
) As Integer
‘사용 방법
Dim instance As IVsObjectList
Dim pobNav As VSOBNAVIGATIONINFO2()
Dim pobName As VSOBNAVNAMEINFONODE()
Dim fDontUpdate As Integer
Dim pfMatchedName As Integer
Dim pIndex As UInteger()
Dim returnValue As Integer

returnValue = instance.LocateNavigationInfo(pobNav, _
    pobName, fDontUpdate, pfMatchedName, _
    pIndex)
int LocateNavigationInfo(
    VSOBNAVIGATIONINFO2[] pobNav,
    VSOBNAVNAMEINFONODE[] pobName,
    int fDontUpdate,
    out int pfMatchedName,
    uint[] pIndex
)
int LocateNavigationInfo(
    [InAttribute] array<VSOBNAVIGATIONINFO2>^ pobNav, 
    [InAttribute] array<VSOBNAVNAMEINFONODE>^ pobName, 
    [InAttribute] int fDontUpdate, 
    [OutAttribute] int% pfMatchedName, 
    [OutAttribute] array<unsigned int>^ pIndex
)
abstract LocateNavigationInfo : 
        pobNav:VSOBNAVIGATIONINFO2[] * 
        pobName:VSOBNAVNAMEINFONODE[] * 
        fDontUpdate:int * 
        pfMatchedName:int byref * 
        pIndex:uint32[] byref -> int 
function LocateNavigationInfo(
    pobNav : VSOBNAVIGATIONINFO2[], 
    pobName : VSOBNAVNAMEINFONODE[], 
    fDontUpdate : int, 
    pfMatchedName : int, 
    pIndex : uint[]
) : int

Parameters

  • fDontUpdate
    Type: System.Int32
    [in] Flag indicating do not update.
  • pfMatchedName
    Type: System.Int32%
    [out] Pointer to a flag indicating a matched name was found.
  • pIndex
    Type: array<System.UInt32[]
    [out] Pointer to the index of the located item.

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 IVsObjectList::LocateNavigationInfo(
   [in] VSOBNAVIGATIONINFO2 *pobNav,
   [in] VSOBNAVNAMEINFONODE *pobName,
   [in] BOOL fDontUpdate,
   [out] BOOL *pfMatchedName,
   [out] ULONG *pIndex
);

When an object has been selected in Object Browser or Class View, and the environment must redraw the view as a result of a sort or expansion, a path back to the selected item must be maintained. The environment will call GetNavigationInfo for the selected object, and each of its parents, ascending the tree until the root node is reached. The environment can then descend the tree, with calls to LocateNavigationInfo to step down through the nodes of the tree list. The VSOBNAVIGATIONINFO2 structure contains the GUID and name of the library. The pobName parameter is a pointer to a VSOBNAVNAMEINFONODE structure containing the name and type of the item of interest. When you find the requested name, set pIndex to the appropriate value for the item, and set pfMatchedName to true. If fDontUpdate is set, and you can't locate the requested item, return E_FAIL. If fDontUpdate is not set and you can't locate the requested item, return pIndex as nulla null reference (Nothing in Visual Basic), and the environment will regenerate the object list.

.NET Framework Security

See Also

Reference

IVsObjectList Interface

IVsObjectList Members

Microsoft.VisualStudio.Shell.Interop Namespace