Debugging Tools for Windows

SetTextMacro

The SetTextMacro and SetTextMacroWide methods set the value of a fixed-name alias.

HRESULT
  IDebugControl::SetTextMacro(
    IN ULONG  Slot,
    IN PCSTR  Macro
    );

HRESULT
  IDebugControl4::SetTextMacroWide(
    IN ULONG  Slot,
    IN PCWSTR  Macro
    );

#ifdef UNICODE
#define SetTextMacroT SetTextMacroWide
#else
#define SetTextMacroT SetTextMacro
#endif

Parameters

Slot
Specifies the number of the fixed-name alias. Slot can take the values 0, 1, …, 9, that represent the fixed-name aliases $u0, $u1, …, $u9.
Macro
Specifies the new value of the alias specified by Slot. The debugger engine makes a copy of this string.

Return Value

S_OK
The method was successful.

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

Interface Version

SetTextMacro is available in all versions of IDebugControl. SetTextMacroWide is available in IDeubgControl4 and later versions.

Comments

Before executing commands or evaluating expressions, the debugger engine will replace the alias specified by Slot with the value of the alias (specified by Macro).

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

Headers: Defined in Dbgeng.h. Include Dbgeng.h.

See Also

GetTextMacro, SetTextReplacement, RemoveTextReplacements, r (Registers)

Build machine: CAPEBUILD