Debugging Tools for Windows

GetSymbolModule

The GetSymbolModule and GetSymbolModuleWide methods return the base address of module which contains the specified symbol.

HRESULT
  IDebugSymbols::GetSymbolModule(
    IN PCSTR  Symbol,
    OUT PULONG64  Base
    );

HRESULT
  IDebugSymbols3::GetSymbolModuleWide(
    IN PCWSTR  Symbol,
    OUT PULONG64  Base
    );

#ifdef UNICODE
#define GetSymbolModuleT GetSymbolModuleWide
#else
#define GetSymbolModuleT GetSymbolModule
#endif

Parameters

Symbol
Specifies the name of the symbol to look up. See the Comments section for details of the syntax of this name.
Base
Receives the location in the target's memory address space of the base of the module. For more information, see Modules.

Return Value

S_OK
The method was successful.
E_NOINTERFACE
The symbol or module could not be found.

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

Interface Version

GetSymbolModule is available in all versions of IDebugSymbols. GetSymbolModuleWide is available in IDebugSymbols3 and later versions.

Comments

The string Symbol must contain an exclamation point ( ). If Symbol is a module-qualified symbol name (for example, mymodules!main) or if the module name is omitted (for example, !main), the engine will search for this symbol and return the module in which it is found. If Symbol contains just a module name (for example, mymodule!) the engine returns the first module with this module name.

For more information about symbols, see Symbols.

Requirements

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

Build machine: CAPEBUILD