Debugging Tools for Windows |
The SetTextReplacement and SetTextReplacementWide methods set the value of a user-named alias.
HRESULT
IDebugControl2::SetTextReplacement(
IN PCSTR SrcText,
IN OPTIONAL PCSTR DstText
);
HRESULT
IDebugControl4::SetTextReplacementWide(
IN PCWSTR SrcText,
IN OPTIONAL PCSTR DstText
);
#ifdef UNICODE
#define SetTextReplacementT SetTextReplacementWide
#else
#define SetTextReplacementT SetTextReplacement
#endif
This method may also return error values. See Return Values for more details.
SetTextReplacement is available in IDebugControl2 and later versions. SetTextReplacementWide is available in IDebugControl4 and later versions.
Before executing commands or evaluating expressions, the debugger engine will replace the alias specified by SrcText with the value of the alias (specified by DstText).
If SrcText is an asterisk (*) and DstText is NULL, all user-named aliases are removed. This is the same behavior as the RemoveTextReplacements method.
When an alias is changed by this method, the event callbacks are notified by passing the DEBUG_CES_TEXT_REPLACEMENTS flag to the IDebugEventCallbacks::ChangeEngineState callback method.
For an overview of aliases used by the debugger engine, see Using Aliases. For more information about using aliases with the debugger engine API, see Interacting with the Engine.
Headers: Defined in Dbgeng.h. Include Dbgeng.h.
GetTextReplacement, RemoveTextReplacements, OutputTextReplacements, SetTextMacro, as, aS (Set Alias), ad (Delete Alias)