IDebugControl3::SetTextReplacement method (dbgeng.h)

The SetTextReplacement method sets the value of a user-named alias.

Syntax

HRESULT SetTextReplacement(
  [in]           PCSTR SrcText,
  [in, optional] PCSTR DstText
);

Parameters

[in] SrcText

Specifies the name of the user-named alias. The debugger engine makes a copy of this string. If SrcText is the same as the name of an automatic alias, the automatic alias is hidden by the new user-named alias.

[in, optional] DstText

Specifies the value of the user-named alias. The debugger engine makes a copy of this string. If DstText is NULL, the user-named alias is removed.

Return value

This method may also return error values. See Return Values for more details.

Return code Description
S_OK
The method was successful.

Remarks

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.

Requirements

Requirement Value
Target Platform Desktop
Header dbgeng.h (include Dbgeng.h)

See also

GetTextReplacement

IDebugControl2

IDebugControl3

OutputTextReplacements

RemoveTextReplacements

SetTextMacro

ad (Delete Alias)

as, aS (Set Alias)