Condividi tramite


IVsTextLines.ReplaceLinesEx Method

Definition

Handles stream-like line editing, such as line breaking and line joining.

public:
 int ReplaceLinesEx(System::UInt32 dwFlags, int iStartLine, int iStartIndex, int iEndLine, int iEndIndex, IntPtr pszText, int iNewLen, cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ pChangedSpan);
public int ReplaceLinesEx (uint dwFlags, int iStartLine, int iStartIndex, int iEndLine, int iEndIndex, IntPtr pszText, int iNewLen, Microsoft.VisualStudio.TextManager.Interop.TextSpan[] pChangedSpan);
abstract member ReplaceLinesEx : uint32 * int * int * int * int * nativeint * int * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] -> int
Public Function ReplaceLinesEx (dwFlags As UInteger, iStartLine As Integer, iStartIndex As Integer, iEndLine As Integer, iEndIndex As Integer, pszText As IntPtr, iNewLen As Integer, pChangedSpan As TextSpan()) As Integer

Parameters

dwFlags
UInt32

[in] ORing of REPLACE_TEXT_FLAGS enum.

iStartLine
Int32

[in] Starting line

iStartIndex
Int32

[in] Starting character index within the line. Must be less than or equal to the length of the line.

iEndLine
Int32

[in] Ending line.

iEndIndex
Int32

[in] Ending character index within the line. Must be less than or equal to the length of the line.

pszText
IntPtr

nativeint

[in] Pointer to text to insert, if any.

iNewLen
Int32

[in] Number of characters to insert, if any.

pChangedSpan
TextSpan[]

[out] Pointer to the range of characters changed.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsTextLines::ReplaceLinesEx(  
   [in] DWORD dwFlags,  
   [in] long iStartLine,  
   [in] CharIndex iStartIndex,  
   [in] long iEndLine,  
   [in] CharIndex iEndIndex,  
   [in] LPCWSTR pszText,  
   [in] long iNewLen,  
   [out] TextSpan *pChangedSpan  
);  

Similar to ReplaceLines, but allows you to specify additional options in the dwFlagsparameter.

Applies to