IDebugSymbols2::GetModuleByModuleName method (dbgeng.h)

The GetModuleByModuleName method searches through the target's modules for one with the specified name.

Syntax

HRESULT GetModuleByModuleName(
  [in]            PCSTR    Name,
  [in]            ULONG    StartIndex,
  [out, optional] PULONG   Index,
  [out, optional] PULONG64 Base
);

Parameters

[in] Name

Specifies the name of the desired module.

[in] StartIndex

Specifies the index to start searching from.

[out, optional] Index

Receives the index of the first module with the name Name. If Index is NULL, this information is not returned.

[out, optional] Base

Receives the location in the target's memory address space of the base of the module. If Base is NULL, this information is not returned.

Return value

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

Return code Description
S_OK
The method was successful.
E_INVALIDARG
One of the arguments passed in was invalid.

Remarks

Starting at the specified index, these methods return the first module they find with the specified name. If the target has more than one module with this name, then subsequent modules can be found by repeated calls to these methods with higher values of StartIndex.

For more information about modules, see Modules.

Requirements

Requirement Value
Target Platform Desktop
Header dbgeng.h (include Dbgeng.h)

See also

GetModuleByModuleName2

IDebugSymbols

IDebugSymbols2

IDebugSymbols3