Share via


IVsSimpleObjectList2.GetSourceContextWithOwnership Method

Definition

Returns a source filename and line number for the given list item.

public:
 int GetSourceContextWithOwnership(System::UInt32 index, [Runtime::InteropServices::Out] System::String ^ % pbstrFilename, [Runtime::InteropServices::Out] System::UInt32 % pulLineNum);
int GetSourceContextWithOwnership(unsigned int index, [Runtime::InteropServices::Out] std::wstring const & & pbstrFilename, [Runtime::InteropServices::Out] unsigned int & pulLineNum);
public int GetSourceContextWithOwnership (uint index, out string pbstrFilename, out uint pulLineNum);
abstract member GetSourceContextWithOwnership : uint32 * string * uint32 -> int
Public Function GetSourceContextWithOwnership (index As UInteger, ByRef pbstrFilename As String, ByRef pulLineNum As UInteger) As Integer

Parameters

index
UInt32

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

pbstrFilename
String

[out] Returns a string containing the file name.

pulLineNum
UInt32

[out] Returns a line number associated with the list item.

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::GetSourceContextWithOwnership(  
   [in]  ULONG  Index,   
   [out] BSTR  *pszFileName,   
   [out] ULONG *pulLineNum  
);  

This method is used to display the source file and line number in the find symbol results window. You can return E_NOTIMPL if you don't want to display this information.

Applies to