IVsTextViewFilter::GetWordExtent Method (Int32, Int32, UInt32, array<TextSpan>^)
Calculates the word extent based on a character position.
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
Parameters
- iLine
-
Type:
System::Int32
[in] Integer containing the line index of the character.
- iIndex
-
Type:
System::Int32
[in] Integer containing the column index of the character.
- dwFlags
-
Type:
System::UInt32
[in] Options for determining the word extent. For a list of dwFlags options, see WORDEXTFLAGS.
- pSpan
-
Type:
array<Microsoft.VisualStudio.TextManager.Interop::TextSpan>^
[out] Pointer to a span object identifying the word extent.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
From textmgr.idl:
HRESULT IVsTextViewFilter::GetWordExtent( [in] long iLine, [in] CharIndex iIndex, [in] DWORD dwFlags, [out] TextSpan * pSpan );
For this method, the environment passes in a line and column index identifying a character position and flags identifying how the word extent should be determined. Your language service then decides the extent of the word based on this information and you can pass this information back to the environment in a text span structure (pSpan).
Note |
|---|
The text span returned in pSpan must contain the original character specified by iLine and iIndex. |
