Partager via


IVsObjectList2.LocateNavigationInfo2 Method

Definition

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

public:
 int LocateNavigationInfo2(cli::array <Microsoft::VisualStudio::Shell::Interop::VSOBNAVIGATIONINFO3> ^ pobNav, cli::array <Microsoft::VisualStudio::Shell::Interop::VSOBNAVNAMEINFONODE2> ^ pobName, int fDontUpdate, [Runtime::InteropServices::Out] int % pfMatchedName, [Runtime::InteropServices::Out] System::UInt32 % pIndex);
int LocateNavigationInfo2(std::Array <Microsoft::VisualStudio::Shell::Interop::VSOBNAVIGATIONINFO3> const & pobNav, std::Array <Microsoft::VisualStudio::Shell::Interop::VSOBNAVNAMEINFONODE2> const & pobName, int fDontUpdate, [Runtime::InteropServices::Out] int & pfMatchedName, [Runtime::InteropServices::Out] unsigned int & pIndex);
public int LocateNavigationInfo2 (Microsoft.VisualStudio.Shell.Interop.VSOBNAVIGATIONINFO3[] pobNav, Microsoft.VisualStudio.Shell.Interop.VSOBNAVNAMEINFONODE2[] pobName, int fDontUpdate, out int pfMatchedName, out uint pIndex);
abstract member LocateNavigationInfo2 : Microsoft.VisualStudio.Shell.Interop.VSOBNAVIGATIONINFO3[] * Microsoft.VisualStudio.Shell.Interop.VSOBNAVNAMEINFONODE2[] * int * int * uint32 -> int
Public Function LocateNavigationInfo2 (pobNav As VSOBNAVIGATIONINFO3(), pobName As VSOBNAVNAMEINFONODE2(), fDontUpdate As Integer, ByRef pfMatchedName As Integer, ByRef pIndex As UInteger) As Integer

Parameters

pobNav
VSOBNAVIGATIONINFO3[]

[in] Specifies navigation information. Values are in a VSOBNAVIGATIONINFO2 structure.

pobName
VSOBNAVNAMEINFONODE2[]

[in] Specifies the name of the node of interest. Values are in a VSOBNAVNAMEINFONODE structure.

fDontUpdate
Int32

[in] Flag indicating that no update should be made.

pfMatchedName
Int32

[out] Pointer to a flag indicating a matched name was found.

pIndex
UInt32

[out] Pointer to the index of the located item.

Returns

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

Remarks

COM Signature

From vsshell80.idl:

[C++]

HRESULT IVsObjectList2::LocateNavigationInfo2(  
   [in] VSOBNAVIGATIONINFO3 *pobNav,   
   [in] VSOBNAVNAMEINFONODE2 *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 calls GetNavigationInfo2for 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 LocateNavigationInfo2 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 null, and the environment regenerates the object list.

Applies to