IVsObjectList2.GetNavigationInfo2 Method
Fills the VSOBNAVIGATIONINFO2 structure for the given list item allowing the list to navigate back to it through LocateNavigationInfo2.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Syntax
'Declaration
Function GetNavigationInfo2 ( _
index As UInteger, _
<OutAttribute> pobNav As VSOBNAVIGATIONINFO3() _
) As Integer
'Usage
Dim instance As IVsObjectList2
Dim index As UInteger
Dim pobNav As VSOBNAVIGATIONINFO3()
Dim returnValue As Integer
returnValue = instance.GetNavigationInfo2(index, _
pobNav)
int GetNavigationInfo2(
uint index,
VSOBNAVIGATIONINFO3[] pobNav
)
int GetNavigationInfo2(
[InAttribute] unsigned int index,
[InAttribute] [OutAttribute] array<VSOBNAVIGATIONINFO3>^ pobNav
)
abstract GetNavigationInfo2 :
index:uint32 *
pobNav:VSOBNAVIGATIONINFO3[] byref -> int
function GetNavigationInfo2(
index : uint,
pobNav : VSOBNAVIGATIONINFO3[]
) : int
Parameters
- index
Type: System.UInt32
[in] Specifies the index of the list item of interest.
- pobNav
Type: array<Microsoft.VisualStudio.Shell.Interop.VSOBNAVIGATIONINFO3[]
[in, out] Specifies navigation information. Values are placed in a VSOBNAVIGATIONINFO2 structure.
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 vsshell80.idl:
[C++]
HRESULT IVsObjectList2::GetNavigationInfo2(
[in] ULONG Index,
[in, out] VSOBNAVIGATIONINFO3 *pobNav
);
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 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 LocateNavigationInfo2 to locate the originally selected object. The environment creates the pobNav structure and passes it to you. You fill pobNav with appropriate values for the index node, and return the structure to the environment. The structure is shown below for reference.
typedef struct _VSOBNAVIGATIONINFO2
{
GUID* pguididLib;
WCHAR* pszLibName;
VSOBNAVNAMEINFONODE* pName;
DWORD dwCustom;
}
Place the GUID of your library into pguididLib and the library name into pszLibName. These two parameters not usually change throughout the series of GetNavigationInfo calls. You may store any custom information in dwCustom. VSOBNAVNAMEINFONODE is a linked list structure that holds the name and type of each node in the navigation tree. Set these values appropriately for each GetNavigationInfo call. The environment handles the linked list addressing.
For more details on these structures, see VSOBNAVIGATIONINFO2 and VSOBNAVNAMEINFONODE.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.