Debugging Tools for Windows

AddSyntheticModule

The AddSyntheticModule and AddSyntheticModuleWide methods add a synthetic module to the module list the debugger maintains for the current process.

HRESULT
  IDebugSymbols3::AddSyntheticModule(
    IN ULONG64  Base,
    IN ULONG  Size,
    IN PCSTR  ImagePath,
    IN PCSTR  ModuleName,
    IN ULONG  Flags
    );

HRESULT
  IDebugSymbols3::AddSyntheticModuleWide(
    IN ULONG64  Base,
    IN ULONG  Size,
    IN PCWSTR  ImagePath,
    IN PCWSTR  ModuleName,
    IN ULONG  Flags
    );

#ifdef UNICODE
#define AddSyntheticModuleT AddSyntheticModuleWide
#else
#define AddSyntheticModuleT AddSyntheticModule
#endif

Parameters

Base
Specifies the location in the process's virtual address space of the base of the synthetic module.
Size
Specifies the size in bytes of the synthetic module.
ImagePath
Specifies the image name of the synthetic module. This is the name that will be returned as the name of the executable file for the synthetic module. The full path should be included if known.
ModuleName
Specifies the module name for the synthetic module.
Flags
Set to DEBUG_ADDSYNTHMOD_DEFAULT.

Return Value

S_OK
The method was successful.

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

Interface Version

AddSyntheticModule and AddSyntheticModuleWide are available in IDebugSymbols3 and later versions.

Comments

The memory region of the synthetic module, described by the Base and Size parameters, must not overlap the memory region of any other module.

If all the modules are reloaded ‑ for example, by calling Reload with the Module parameter set to an empty string ‑ all synthetic modules will be discarded.

For more information about synthetic modules, see Synthetic Modules.

Requirements

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

See Also

RemoveSyntheticModule, AddSyntheticSymbol

Build machine: CAPEBUILD