IDebugControl2::SetTextReplacement method

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

Syntax


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

Parameters

SrcText [in]

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.

DstText [in, optional]

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 codeDescription
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

Header

Dbgeng.h (include Dbgeng.h)

See also

IDebugControl2
IDebugControl3
GetTextReplacement
RemoveTextReplacements
OutputTextReplacements
SetTextMacro
as, aS (Set Alias)
ad (Delete Alias)

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft