Debugging Tools for Windows |
The GetModuleNameString and GetModuleNameStringWide methods return the name of the specified module.
HRESULT
IDebugSymbols2::GetModuleNameString(
IN ULONG Which,
IN ULONG Index,
IN ULONG64 Base,
OUT OPTIONAL PSTR Buffer,
IN ULONG BufferSize,
OUT OPTIONAL PULONG NameSize
);
HRESULT
IDebugSymbols3::GetModuleNameStringWide(
IN ULONG Which,
IN ULONG Index,
IN ULONG64 Base,
OUT OPTIONAL PWSTR Buffer,
IN ULONG BufferSize,
OUT OPTIONAL PULONG NameSize
);
#ifdef UNICODE
#define GetModuleNameStringT GetModuleNameStringWide
#else
#define GetModuleNameStringT GetModuleNameString
#endif
Value | Description |
---|---|
DEBUG_MODNAME_IMAGE | The image name. This is the name of the executable file, including the extension. Typically, the full path is included in user mode but not in kernel mode. |
DEBUG_MODNAME_MODULE | The module name. This is usually just the file name without the extension. In a few cases, the module name differs significantly from the file name. For details, see Executable Image Path. |
DEBUG_MODNAME_LOADED_IMAGE | The loaded image name. Unless Microsoft® CodeView® symbols are present, this is the same as the image name. |
DEBUG_MODNAME_SYMBOL_FILE | The symbol file name. The path and name of the symbol file. If no symbols have been loaded, this is the name of the executable file instead. |
DEBUG_MODNAME_MAPPED_IMAGE | The mapped image name. In most cases, this is NULL. If the debugger is mapping an image file (for example, during minidump debugging), this is the name of the mapped image. |
This method may also return error values. See Return Values for more details.
GetModuleNameString is available in IDebugSymbols2 and later versions. GetModuleNameStringWide is available in IDebugSymbols3 and later versions.
For more information about modules, see Modules.
Headers: Defined in Dbgeng.h. Include Dbgeng.h.