IVsTextView::ReplaceTextOnLine Method (Int32, Int32, Int32, String^, Int32)

 

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.

From textmgr.idl:

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