IDebugSymbols2::GetModuleNames method (dbgeng.h)

The GetModuleNames method returns the names of the specified module.

Syntax

HRESULT GetModuleNames(
  [in]            ULONG   Index,
  [in]            ULONG64 Base,
  [out, optional] PSTR    ImageNameBuffer,
  [in]            ULONG   ImageNameBufferSize,
  [out, optional] PULONG  ImageNameSize,
  [out, optional] PSTR    ModuleNameBuffer,
  [in]            ULONG   ModuleNameBufferSize,
  [out, optional] PULONG  ModuleNameSize,
  [out, optional] PSTR    LoadedImageNameBuffer,
  [in]            ULONG   LoadedImageNameBufferSize,
  [out, optional] PULONG  LoadedImageNameSize
);

Parameters

[in] Index

Specifies the index of the module whose names are requested. If it is set to DEBUG_ANY_ID, the module is specified by Base.

[in] Base

Specifies the base address of the module whose names are requested. This parameter is only used if Index is set to DEBUG_ANY_ID.

[out, optional] ImageNameBuffer

Receives the image name of the module. If ImageNameBuffer is NULL, this information is not returned.

[in] ImageNameBufferSize

Specifies the size in characters of the buffer ImageNameBuffer in characters. This size includes the space for the '\0' terminating character.

[out, optional] ImageNameSize

Receives the size in characters of the image name. This size includes the space for the '\0' terminating character. If ImageNameSize is NULL, this information is not returned.

[out, optional] ModuleNameBuffer

Receives the module name of the module. If ModuleNameBuffer is NULL, this information is not returned.

[in] ModuleNameBufferSize

Specifies the size in characters of the buffer ModuleNameBuffer. This size includes the space for the '\0' terminating character.

[out, optional] ModuleNameSize

Receives the size in characters of the module name. This size includes the space for the '\0' terminating character. If ModuleNameSize is NULL, this information is not returned.

[out, optional] LoadedImageNameBuffer

Receives the loaded image name of the module. If LoadedImageNameBuffer is NULL, this information is not returned.

[in] LoadedImageNameBufferSize

Specifies the size in characters of the buffer LoadedImageNameBuffer. This size includes the space for the '\0' terminating character.

[out, optional] LoadedImageNameSize

Receives the size in characters of the loaded image name. This size includes the space for the '\0' terminating character. If LoadedImageNameSize 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.
S_FALSE
The method was successful. However, at least one of ImageNameBuffer, ModuleNameBuffer, or LoadedImageNameBuffer was too small for the corresponding name, so it was truncated.
E_NOINTERFACE
The specified module was not found.

Remarks

For more information about modules, see Modules.

Requirements

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

See also

GetModuleNameString

IDebugSymbols

IDebugSymbols2

IDebugSymbols3