IVsCompletionSet::GetDisplayText Method (Int32, String^, array<Int32>^)
Returns the text of a completion set item as it appears in the completion set list.
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
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::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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. |
