Debugging Tools for Windows

WriteSymbol

The WriteSymbol and WriteSymbolWide methods set the value of the specified symbol.

HRESULT
  IDebugSymbolGroup::WriteSymbol(
    IN ULONG  Index,
    IN PCSTR  Value
    );

HRESULT
  IDebugSymbolGroup::WriteSymbolWide(
    IN ULONG  Index,
    IN PCWSTR  Value
    );

#ifdef UNICODE
#define WriteSymbolT WriteSymbolWide
#else
#define WriteSymbolT WriteSymbol
#endif

Parameters

Index
The index of the symbol whose value will be changed. The index of a symbol is an identification number. The index ranges from zero through the number of symbols in the symbol group minus one.
Value
A C++ expression that is evaluated to give the symbol's new value.

Return Value

WriteSymbol and WriteSymbolWide might return one of the following values:

S_OK
The method was successful.

This method might also return error values. For more information about possible return values, see Return Values.

Comments

Th WriteSymbol and WriteSymbolWide methods can change symbols only if the symbols are stored in a register or memory location that the debugger engine knowns and if they have not had their type changed to an extension by using the OutputAsType method.

For more information about symbol groups, see Scopes and Symbol Groups.

Requirements

Versions: WriteSymbol is available in all versions of IDebugSymbolGroup. WriteSymbolWide is available in IDebugSymbolGroup2 and later versions.

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

See Also

GetNumberSymbols, GetSymbolValueText

Build machine: CAPEBUILD