Udostępnij za pośrednictwem


IVsTextImage.Replace(UInt32, TextSpan[], Int32, String, TextSpan[]) Method

Definition

Notification of a text span replacement.

public:
 int Replace(System::UInt32 dwFlags, cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ pts, int cch, System::String ^ pchText, cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsChanged);
public:
 int Replace(unsigned int dwFlags, Platform::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ pts, int cch, Platform::String ^ pchText, Platform::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsChanged);
int Replace(unsigned int dwFlags, std::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> const & pts, int cch, std::wstring const & pchText, std::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> const & ptsChanged);
public int Replace (uint dwFlags, Microsoft.VisualStudio.TextManager.Interop.TextSpan[] pts, int cch, string pchText, Microsoft.VisualStudio.TextManager.Interop.TextSpan[] ptsChanged);
abstract member Replace : uint32 * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] * int * string * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] -> int
Public Function Replace (dwFlags As UInteger, pts As TextSpan(), cch As Integer, pchText As String, ptsChanged As TextSpan()) As Integer

Parameters

dwFlags
UInt32

[in] Double word containing flags. For future use. Set to zero.

pts
TextSpan[]

[in] Pointer to a TextSpan structure.

cch
Int32

[in] Count of characters in pchText.

pchText
String

[in] Pointer to a text string.

ptsChanged
TextSpan[]

[out] Specifies the modified TextSpan structure.

Returns

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

Remarks

The environment will call IVsTextImage.Replace to notify you of a replace operation done on a text span. Return the new text span to the environment.

COM Signature

From 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  
);  

Applies to