IVsTextImage.Replace 方法
通知的文字範圍取代。
命名空間: Microsoft.VisualStudio.TextManager.Interop
組件: Microsoft.VisualStudio.TextManager.Interop (在 Microsoft.VisualStudio.TextManager.Interop.dll 中)
語法
'宣告
Function Replace ( _
dwFlags As UInteger, _
pts As TextSpan(), _
cch As Integer, _
pchText As String, _
<OutAttribute> ptsChanged As TextSpan() _
) As Integer
int Replace(
uint dwFlags,
TextSpan[] pts,
int cch,
string pchText,
TextSpan[] ptsChanged
)
int Replace(
[InAttribute] unsigned int dwFlags,
[InAttribute] array<TextSpan>^ pts,
[InAttribute] int cch,
[InAttribute] String^ pchText,
[OutAttribute] array<TextSpan>^ ptsChanged
)
abstract Replace :
dwFlags:uint32 *
pts:TextSpan[] *
cch:int *
pchText:string *
ptsChanged:TextSpan[] byref -> int
function Replace(
dwFlags : uint,
pts : TextSpan[],
cch : int,
pchText : String,
ptsChanged : TextSpan[]
) : int
參數
dwFlags
類型:UInt32[in]包含旗標的雙字。 供日後使用。 設為零。
pts
類型:array<Microsoft.VisualStudio.TextManager.Interop.TextSpan[][in]指標TextSpan結構。
cch
類型:Int32[in]中的字元計數pchText。
pchText
類型:String[in]文字字串的指標。
ptsChanged
類型:array<Microsoft.VisualStudio.TextManager.Interop.TextSpan[][] out指定修改過TextSpan結構。
傳回值
類型:Int32
如果此方法將會成功,則會傳回S_OK。如果失敗,它就會傳回錯誤碼。
備註
環境將會呼叫IVsTextImage.Replace來通知您在文字範圍上進行取代作業。 返回環境中的新的文字範圍。
COM 簽章
從 textmgr.idl:
HRESULT IVsTextImage::Replace(
[in] DWORD dwFlags,
[in] const TextSpan * pts,
[in] LONG cch,
[in, size_is(cch)] LPCOLESTR pchText,
[out, retval] TextSpan * ptsChanged
);
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。