다음을 통해 공유


IVsSimpleObjectList2.CanGoToSource(UInt32, VSOBJGOTOSRCTYPE, Int32) Method

Definition

Returns a flag indicating if navigation to the given list item's source is supported.

public:
 int CanGoToSource(System::UInt32 index, Microsoft::VisualStudio::Shell::Interop::VSOBJGOTOSRCTYPE SrcType, [Runtime::InteropServices::Out] int % pfOK);
int CanGoToSource(unsigned int index, Microsoft::VisualStudio::Shell::Interop::VSOBJGOTOSRCTYPE SrcType, [Runtime::InteropServices::Out] int & pfOK);
public int CanGoToSource (uint index, Microsoft.VisualStudio.Shell.Interop.VSOBJGOTOSRCTYPE SrcType, out int pfOK);
abstract member CanGoToSource : uint32 * Microsoft.VisualStudio.Shell.Interop.VSOBJGOTOSRCTYPE * int -> int
Public Function CanGoToSource (index As UInteger, SrcType As VSOBJGOTOSRCTYPE, ByRef pfOK As Integer) As Integer

Parameters

index
UInt32

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

SrcType
VSOBJGOTOSRCTYPE

[in] Specifies the source type. Values are taken from the VSOBJGOTOSRCTYPE enumeration.

pfOK
Int32

[out] Pointer to a flag indicating whether navigation is supported.

Returns

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

Remarks

COM Signature

From vsshell80.idl:

HRESULT IVsSimpleObjectList2::CanGoToSource(  
   [in] ULONG            Index,   
   [in] VSOBJGOTOSRCTYPE SrcType,   
   [out] BOOL*           pfOK  
);  

Returns true in pfOK if navigation to the source of the specified type (definition, declaration, or reference), is possible, false otherwise. This is what enables the GoToDefinition, GoToDeclaration, and GoToReference commands in the UI. Most languages do not have a separate declaration from the definition.

Applies to