Freigeben über


IVsTextLayer.ReplaceLines Method

Definition

Handles line breaking/joining, etc.

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

Parameters

iStartLine
Int32

[in] Starting line.

iStartIndex
Int32

[in] Starting character index within the line (must be <= length of line).

iEndLine
Int32

[in] Ending line.

iEndIndex
Int32

[in] Ending character index within the line (must be <= length of line).

pszText
IntPtr

nativeint

[in] Text to insert, if any.

iNewLen
Int32

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

pChangedSpan
TextSpan[]

[out] 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 IVsTextLayer::ReplaceLines(  
   [in] long iStartLine,  
   [in] CharIndex iStartIndex,  
   [in] long iEndLine,  
   [in] CharIndex iEndIndex,  
   [in] LPCWSTR pszText,  
   [in] long iNewLen,  
   [out] TextSpan * pChangedSpan  
);  

Applies to