Debugging Tools for Windows

GetTextReplacement

The GetTextReplacement and GetTextReplacementWide methods return the value of a user-named alias or an automatic alias.

HRESULT
  IDebugControl2::GetTextReplacement(
    IN OPTIONAL PCSTR  SrcText,
    IN ULONG  Index,
    OUT OPTIONAL PSTR  SrcBuffer,
    IN ULONG  SrcBufferSize,
    OUT OPTIONAL PULONG  SrcSize,
    OUT OPTIONAL PSTR  DstBuffer,
    IN ULONG  DstBufferSize,
    OUT OPTIONAL PULONG  DstSize
    );

HRESULT
  IDebugControl4::GetTextReplacementWide(
    IN OPTIONAL PCWSTR  SrcText,
    IN ULONG  Index,
    OUT OPTIONAL PWSTR  SrcBuffer,
    IN ULONG  SrcBufferSize,
    OUT OPTIONAL PULONG  SrcSize,
    OUT OPTIONAL PWSTR  DstBuffer,
    IN ULONG  DstBufferSize,
    OUT OPTIONAL PULONG  DstSize
    );

#ifdef UNICODE
#define GetTextReplacementT GetTextReplacementWide
#else
#define GetTextReplacementT GetTextReplacement
#endif

Parameters

SrcText
Specifies the name of the alias. The engine first searches the user-named aliases for one with this name. Then, if no match is found, the automatic aliases are searched. If SrcText is NULL, Index is used to specify the alias.
Index
Specifies the index of an alias. The indexes of the user-named aliases come before the indexes of the automatic aliases. Index is only used if SrcText is NULL. Index can be used along with GetNumberTextReplacements to iterate over all the user-named and automatic aliases.
SrcBuffer
Receives the name of the alias. This is the name specified in SrcText, if SrcText is not NULL. If SrcBuffer is NULL, this information is not returned.
SrcBufferSize
Specifies the size, in characters, of the SrcBuffer buffer.
SrcSize
Receives the size, in characters, of the name of the alias. If SrcSize is NULL, this information is not returned.
DstBuffer
Receives the value of the alias specified by SrcText and Index. If DstBuffer is NULL, this information is not returned.
DstBufferSize
Specifies the size, in characters, of the DstBuffer buffer.
DstSize
Receives the size, in characters, of the value of the alias. If DstSize is NULL, this information is not returned.

Return Value

S_OK
The method was successful.

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

Interface Version

GetTextReplacement is available in IDebugControl2 and later versions. GetTextReplacementWide is available in IDebugControl4 and later versions.

Comments

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

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

SetTextReplacement, GetNumberTextReplacements, OutputTextReplacements, GetTextMacro, al (List Aliases)

Build machine: CAPEBUILD