IVsSimpleObjectList2.GetSourceContextWithOwnership Method
Returns a source filename and line number for the given list item.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Syntax
'Declaration
Function GetSourceContextWithOwnership ( _
index As UInteger, _
<OutAttribute> ByRef pbstrFilename As String, _
<OutAttribute> ByRef pulLineNum As UInteger _
) As Integer
int GetSourceContextWithOwnership(
uint index,
out string pbstrFilename,
out uint pulLineNum
)
int GetSourceContextWithOwnership(
[InAttribute] unsigned int index,
[OutAttribute] String^% pbstrFilename,
[OutAttribute] unsigned int% pulLineNum
)
abstract GetSourceContextWithOwnership :
index:uint32 *
pbstrFilename:string byref *
pulLineNum:uint32 byref -> int
function GetSourceContextWithOwnership(
index : uint,
pbstrFilename : String,
pulLineNum : uint
) : int
Parameters
- index
Type: System.UInt32
[in] Specifies the index of the list item of interest.
- pbstrFilename
Type: System.String%
[out] Returns a string containing the file name.
- pulLineNum
Type: System.UInt32%
[out] Returns a line number associated with the list item.
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:
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.
.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.