共用方式為


IVsNavigableLocationResolver.GetDisplayText Method

Gets text to display in context menu for specified location.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

Syntax

'宣告
Function GetDisplayText ( _
    dwReserved As UInteger, _
    ptsBase As TextSpan(), _
    pBuffer As IVsTextLines, _
    <OutAttribute> ByRef dwOutFlags As UInteger, _
    <OutAttribute> ByRef pbstrDisplayText As String _
) As Integer
int GetDisplayText(
    uint dwReserved,
    TextSpan[] ptsBase,
    IVsTextLines pBuffer,
    out uint dwOutFlags,
    out string pbstrDisplayText
)
int GetDisplayText(
    [InAttribute] unsigned int dwReserved, 
    [InAttribute] array<TextSpan>^ ptsBase, 
    [InAttribute] IVsTextLines^ pBuffer, 
    [OutAttribute] unsigned int% dwOutFlags, 
    [OutAttribute] String^% pbstrDisplayText
)
abstract GetDisplayText : 
        dwReserved:uint32 * 
        ptsBase:TextSpan[] * 
        pBuffer:IVsTextLines * 
        dwOutFlags:uint32 byref * 
        pbstrDisplayText:string byref -> int 
function GetDisplayText(
    dwReserved : uint, 
    ptsBase : TextSpan[], 
    pBuffer : IVsTextLines, 
    dwOutFlags : uint, 
    pbstrDisplayText : String
) : int

Parameters

  • dwOutFlags
    Type: System.UInt32%
    [out] If current location is a URL.
  • pbstrDisplayText
    Type: System.String%
    [out] Text to display in context menu.

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 textmgr.idl:

HRESULT IVsNavigableLocationResolver::GetDisplayText(
   [in] DWORD dwReserved,
   [in] TextSpan *ptsBase,
   [in] IVsTextLines *pBuffer,
   [out] NavigableLocationResolverFlags *dwOutFlags,
   [out,retval] BSTR * pbstrDisplayText
);

.NET Framework Security

See Also

Reference

IVsNavigableLocationResolver Interface

Microsoft.VisualStudio.TextManager.Interop Namespace