IVsTextView.ReplaceTextOnLine Method

Replaces line text.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

int ReplaceTextOnLine(
	int iLine,
	int iStartCol,
	int iCharsToReplace,
	string pszNewText,
	int iNewLen
)

Parameters

iLine
Type: System.Int32

[in] Integer containing the line.

iStartCol
Type: System.Int32

[in] Integer containing the starting column.

iCharsToReplace
Type: System.Int32

[in] Integer containing the number of characters to replace.

pszNewText
Type: System.String

[in] Pointer the new text being passed in.

iNewLen
Type: System.Int32

[in] Length of the buffer (number of characters) being passed in.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

COM Signature

From textmgr.idl:

HRESULT IVsTextView::ReplaceTextOnLine(
   [in] long iLine,
   [in] CharIndex iStartCol,
   [in] long iCharsToReplace,
   [in] const WCHAR *pszNewText,
   [in] long iNewLen
);

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft