Compartir a través de


IVsCompletionSet.GetDisplayText Method

Returns the text of a completion set item as it appears in the completion set list.

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

Syntax

'Declaración
Function GetDisplayText ( _
    iIndex As Integer, _
    <OutAttribute> ByRef ppszText As String, _
    <OutAttribute> piGlyph As Integer() _
) As Integer
int GetDisplayText(
    int iIndex,
    out string ppszText,
    int[] piGlyph
)
int GetDisplayText(
    [InAttribute] int iIndex, 
    [OutAttribute] String^% ppszText, 
    [OutAttribute] array<int>^ piGlyph
)
abstract GetDisplayText : 
        iIndex:int * 
        ppszText:string byref * 
        piGlyph:int[] byref -> int 
function GetDisplayText(
    iIndex : int, 
    ppszText : String, 
    piGlyph : int[]
) : int

Parameters

  • iIndex
    Type: System.Int32
    [in] Index of completion set item to return display text for.
  • ppszText
    Type: System.String%
    [out] Returns a string containing the display text.
  • piGlyph
    Type: array<System.Int32[]
    [out] Returns an integer identifying the glyph to display next to the completion 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 textmgr.idl:

HRESULT IVsCompletionSet::GetDisplayText(
   [in] long iIndex,
   [out] WCHAR **ppszText,
   [out, optional] long *piGlyph
);

The string returned should be maintained by the completion set object, and the string should remain valid until final release, or until updated by calling UpdateCompletionStatus. GetImageList is used by the view to determine the list of images associated with a completion set.

Note

The string is typically created by the completion set object and the string must persist for the life of that object or until the Dismiss method is called.

If you are implementing this interface in managed code and you need to have the string disposed of by the caller, implement the IVsCoTaskMemFreeMyStrings interface.

.NET Framework Security

See Also

Reference

IVsCompletionSet Interface

Microsoft.VisualStudio.TextManager.Interop Namespace