IDebugHostModule::FindSymbolByName method (dbgmodel.h)

The FindSymbolByName method will find a single global symbol of the given name within the module. If there is not a single symbol matching the given name, an error will be returned by this method. Note that this method will prefer returning a private symbol over a symbol in the publics table.

Syntax

HRESULT FindSymbolByName(
  PCWSTR           symbolName,
  IDebugHostSymbol **symbol
);

Parameters

symbolName

The name of the symbol to locate within the symbolic information for the module.

symbol

The found symbol will be returned here.

Return value

This method returns HRESULT which indicates success or failure.

Remarks

Sample Code

ComPtr<IDebugHostModule> spModule; /* get a module (see FindModuleByName) */

// Find the symbol for g_someGlobal;
ComPtr<IDebugHostSymbol> spSymbol;
if (SUCCEEDED(spModule->FindSymbolByName(L"g_someGlobal", &spSymbol)))
{
    // spSymbol contains the symbol for g_someGlobal.  It may be any kind of symbol.
}

Requirements

Requirement Value
Header dbgmodel.h

See also

IDebugHostModule interface