MapDebugInformation

The MapDebugInformation function gains access to the debug information for an image.

PIMAGE_DEBUG_INFORMATION MapDebugInformation(
  IN HANDLE FileHandle, 
  IN LPSTR FileName,    
  IN LPSTR SymbolPath,  
  IN DWORD ImageBase    
);
 

Parameters

FileHandle
Handle to an open executable image, a symbol file, or NULL.
FileName
Pointer to a null-terminated string that specifies the name of an executable image file, symbol file, or NULL.
SymbolPath
Pointer to a null-terminated string that specifies the path where symbol files are located. The path can be multiple paths, each separated by a semicolon (;).
ImageBase
Specifies the base address for the image or zero.

Return Values

If the function succeeds, the return value is a pointer to an IMAGE_DEBUG_INFORMATION structure.

If the function fails, the return value is NULL. To retrieve extended error information, call GetLastError.

Remarks

The MapDebugInformation function is used to gain access to an image's debug information. The debug information is extracted from the image or the symbol file and placed into the IMAGE_DEBUG_INFORMATION structure. This structure is allocated by ImageHlp and must be deallocated by using the UnmapDebugInformation function. The memory for the structure is not in the process's default heap, so attempts to free it with a memory deallocation routine will fail.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in imagehlp.h.
  Import Library: Use imagehlp.lib.

See Also

PE Image Helper (ImageHlp) Overview, ImageHlp Debugger Functions, IMAGE_DEBUG_INFORMATION, UnmapDebugInformation