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

Definition

Notification of a text span replacement.

C++/CX
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);

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:

cpp#
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

Produkt Versiounen
Visual Studio SDK 2015, 2017, 2019, 2022