Completion Set. Get Display Text(Int32, String, Int32) Method
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the text of a completion set item as it appears in the completion set list.
int GetDisplayText(int iIndex, [Runtime::InteropServices::Out] std::wstring const & & ppszText, std::Array <int> const & piGlyph);
public int GetDisplayText (int iIndex, out string ppszText, int piGlyph);
abstract member GetDisplayText : int * string * int -> int
Public Function GetDisplayText (iIndex As Integer, ByRef ppszText As String, Optional piGlyph As Integer()) As Integer
[in] Index of completion set item to return display text for.
[out] Returns a string containing the display text.
[out] Returns an integer identifying the glyph to display next to the completion item.
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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.
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.