IVsTextImage.Replace(UInt32, TextSpan[], Int32, String, TextSpan[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
- cch
- Int32
[in] Count of characters in pchText
.
- pchText
- String
[in] Pointer to a text string.
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
);