Debugging Tools for Windows

AddSyntheticSymbol

The AddSyntheticSymbol and AddSyntheticSymbolWide methods add a synthetic symbol to a module in the current process.

HRESULT
  IDebugSymbols3::AddSyntheticSymbol(
    IN ULONG64  Offset,
    IN ULONG  Size,
    IN PCSTR  Name,
    IN ULONG  Flags,
    OUT OPTIONAL PDEBUG_MODULE_AND_ID  Id
    );

HRESULT
  IDebugSymbols3::AddSyntheticSymbolWide(
    IN ULONG64  Offset,
    IN ULONG  Size,
    IN PCSTR  Name,
    IN ULONG  Flags,
    OUT OPTIONAL PDEBUG_MODULE_AND_ID  Id
    );

#ifdef UNICODE
#define AddSyntheticSymbolT AddSyntheticSymbolWide
#else
#define AddSyntheticSymbolT AddSyntheticSymbol
#endif

Parameters

Offset
Specifies the location in the process's virtual address space of the synthetic symbol.
Size
Specifies the size in bytes of the synthetic symbol.
Name
Specifies the name of the synthetic symbol.
Flags
Set to DEBUG_ADDSYNTHSYM_DEFAULT.
Id
Receives the DEBUG_MODULE_AND_ID structure that identifies the synthetic symbol. If Id 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

AddSyntheticSymbol and AddSyntheticSymbolWide are available in IDebugSymbols3 and later versions.

Comments

The location of the synthetic symbol must not be the same as the location of another symbol.

If the module containing a synthetic symbol is reloaded ‑ for example, by calling Reload with the Module parameter set to the name of the module ‑ the synthetic symbol will be discarded.

For more information about synthetic symbols, see Synthetic Symbols.

Requirements

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

See Also

RemoveSyntheticSymbol, AddSyntheticModule

Build machine: CAPEBUILD