IVsObjectList2.LocateNavigationInfo2 Method

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

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in microsoft.visualstudio.shell.interop.8.0.dll)

int LocateNavigationInfo2 (
	[InAttribute] VSOBNAVIGATIONINFO3[] pobNav,
	[InAttribute] VSOBNAVNAMEINFONODE2[] pobName,
	[InAttribute] int fDontUpdate,
	out int pfMatchedName,
	out uint pIndex
int LocateNavigationInfo2 (
	/** @attribute InAttribute() */ VSOBNAVIGATIONINFO3[] pobNav, 
	/** @attribute InAttribute() */ VSOBNAVNAMEINFONODE2[] pobName, 
	/** @attribute InAttribute() */ int fDontUpdate, 
	/** @attribute OutAttribute() */ /** @ref */ int pfMatchedName, 
	/** @attribute OutAttribute() */ /** @ref */ UInt32 pIndex
JScript does not support passing value-type arguments by reference.



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


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


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


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


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

Return Value

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

COM Signature

From vsshell80.idl:

HRESULT IVsObjectList2::LocateNavigationInfo2(
   [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 a null reference (Nothing in Visual Basic), and the environment regenerates the object list.

Community Additions